mirror of
https://github.com/danog/postgres.git
synced 2024-11-26 12:04:50 +01:00
25 lines
588 B
PHP
25 lines
588 B
PHP
<?php
|
|
|
|
namespace Amp\Postgres\Test;
|
|
|
|
use Amp\CancellationToken;
|
|
use Amp\Loop;
|
|
use Amp\Postgres\PgSqlConnection;
|
|
use Amp\Promise;
|
|
use Amp\Sql\ConnectionConfig;
|
|
|
|
/**
|
|
* @requires extension pgsql
|
|
*/
|
|
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");
|
|
}
|
|
|
|
return PgSqlConnection::connect($connectionConfig, $token);
|
|
}
|
|
}
|