mirror of
https://github.com/danog/postgres.git
synced 2024-11-27 04:24:45 +01:00
Test and formatting updates
This commit is contained in:
parent
23129d66b5
commit
87809b70d1
@ -4,8 +4,7 @@ namespace Amp\Postgres\Test;
|
|||||||
|
|
||||||
use Amp\Postgres\AggregatePool;
|
use Amp\Postgres\AggregatePool;
|
||||||
|
|
||||||
class AggregatePoolTest extends AbstractPoolTest
|
class AggregatePoolTest extends AbstractPoolTest {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @param array $connections
|
* @param array $connections
|
||||||
*
|
*
|
||||||
|
@ -6,8 +6,7 @@ use Amp\Postgres\ConnectionPool;
|
|||||||
use Amp\Success;
|
use Amp\Success;
|
||||||
use Interop\Async\Awaitable;
|
use Interop\Async\Awaitable;
|
||||||
|
|
||||||
class ConnectionPoolTest extends AbstractPoolTest
|
class ConnectionPoolTest extends AbstractPoolTest {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @param array $connections
|
* @param array $connections
|
||||||
*
|
*
|
||||||
|
@ -4,8 +4,13 @@ namespace Amp\Postgres\Test;
|
|||||||
|
|
||||||
use Amp\Postgres\{ Connection, function connect };
|
use Amp\Postgres\{ Connection, function connect };
|
||||||
|
|
||||||
class FunctionsTest extends \PHPUnit_Framework_TestCase
|
class FunctionsTest extends \PHPUnit_Framework_TestCase {
|
||||||
{
|
public function setUp() {
|
||||||
|
if (!\extension_loaded('pgsql') && !\extension_loaded('pq')) {
|
||||||
|
$this->markTestSkipped('This test requires either ext/pgsql or pecl/pq');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function testConnect() {
|
public function testConnect() {
|
||||||
\Amp\execute(function () {
|
\Amp\execute(function () {
|
||||||
$connection = yield connect('host=localhost user=postgres', 1);
|
$connection = yield connect('host=localhost user=postgres', 1);
|
||||||
|
@ -4,6 +4,9 @@ namespace Amp\Postgres\Test;
|
|||||||
|
|
||||||
use Amp\Postgres\{ Connection, PgSqlConnection };
|
use Amp\Postgres\{ Connection, PgSqlConnection };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @requires extension pgsql
|
||||||
|
*/
|
||||||
class PgSqlConnectionTest extends AbstractConnectionTest {
|
class PgSqlConnectionTest extends AbstractConnectionTest {
|
||||||
/** @var resource PostgreSQL connection resource. */
|
/** @var resource PostgreSQL connection resource. */
|
||||||
protected $handle;
|
protected $handle;
|
||||||
|
@ -4,6 +4,9 @@ namespace Amp\Postgres\Test;
|
|||||||
|
|
||||||
use Amp\Postgres\{ Connection, PqConnection };
|
use Amp\Postgres\{ Connection, PqConnection };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @requires extension pq
|
||||||
|
*/
|
||||||
class PqConnectionTest extends AbstractConnectionTest {
|
class PqConnectionTest extends AbstractConnectionTest {
|
||||||
/** @var resource PostgreSQL connection resource. */
|
/** @var resource PostgreSQL connection resource. */
|
||||||
protected $handle;
|
protected $handle;
|
||||||
|
Loading…
Reference in New Issue
Block a user