public function testConnectWithWrongHost()
{
$this->skipIf(!$this->with('PostgreSql'));
$config = $this->_dbConfig;
$config['host'] = 'unknown.host.nowhere';
$config['object'] = null;
$connection = 'wrong_host';
Connections::add($connection, $config);
$this->assertException('/.*/', function () use($connection) {
Connections::get($connection)->connect();
});
}