/**
* Tests that connecting with invalid credentials or database name throws an exception
*
* @expectedException \Cake\Database\Exception\MissingConnectionException
* @return void
*/
public function testWrongCredentials()
{
$config = ConnectionManager::config('test');
$this->skipIf(isset($config['url']), 'Datasource has dsn, skipping.');
$connection = new Connection(['database' => '/dev/nonexistent'] + ConnectionManager::config('test'));
$connection->connect();
}