1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-02 17:37:57 +01:00
postgres/test/PgSqlConnectTest.php

25 lines
588 B
PHP
Raw Normal View History

2017-06-15 05:46:25 +02:00
<?php
namespace Amp\Postgres\Test;
use Amp\CancellationToken;
use Amp\Loop;
2017-06-15 05:46:25 +02:00
use Amp\Postgres\PgSqlConnection;
use Amp\Promise;
2018-07-01 19:33:12 +02:00
use Amp\Sql\ConnectionConfig;
2017-06-15 05:46:25 +02:00
/**
* @requires extension pgsql
*/
2018-07-01 19:33:12 +02:00
class PgSqlConnectTest extends AbstractConnectTest
{
public function connect(ConnectionConfig $connectionConfig, CancellationToken $token = null): Promise
{
if (Loop::get()->getHandle() instanceof \EvLoop) {
$this->markTestSkipped("ext-pgsql is not compatible with pecl-ev");
}
2018-07-01 19:33:12 +02:00
return PgSqlConnection::connect($connectionConfig, $token);
2017-06-15 05:46:25 +02:00
}
}