markTestSkipped('This test requires either ext/pgsql or pecl/pq'); } } public function testConnect() { Loop::run(function () { $connection = yield connect(ConnectionConfig::fromString('host=localhost user=postgres')); $this->assertInstanceOf(Connection::class, $connection); }); } /** * @expectedException \Amp\Sql\FailureException */ public function testConnectInvalidUser() { Loop::run(function () { $connection = yield connect(ConnectionConfig::fromString('host=localhost user=invalid')); }); } }