mirror of
https://github.com/danog/postgres.git
synced 2024-11-30 04:29:12 +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;
|
||||
|
||||
class AggregatePoolTest extends AbstractPoolTest
|
||||
{
|
||||
class AggregatePoolTest extends AbstractPoolTest {
|
||||
/**
|
||||
* @param array $connections
|
||||
*
|
||||
|
@ -6,8 +6,7 @@ use Amp\Postgres\ConnectionPool;
|
||||
use Amp\Success;
|
||||
use Interop\Async\Awaitable;
|
||||
|
||||
class ConnectionPoolTest extends AbstractPoolTest
|
||||
{
|
||||
class ConnectionPoolTest extends AbstractPoolTest {
|
||||
/**
|
||||
* @param array $connections
|
||||
*
|
||||
|
@ -4,8 +4,13 @@ namespace Amp\Postgres\Test;
|
||||
|
||||
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() {
|
||||
\Amp\execute(function () {
|
||||
$connection = yield connect('host=localhost user=postgres', 1);
|
||||
|
@ -4,6 +4,9 @@ namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Postgres\{ Connection, PgSqlConnection };
|
||||
|
||||
/**
|
||||
* @requires extension pgsql
|
||||
*/
|
||||
class PgSqlConnectionTest extends AbstractConnectionTest {
|
||||
/** @var resource PostgreSQL connection resource. */
|
||||
protected $handle;
|
||||
|
@ -4,6 +4,9 @@ namespace Amp\Postgres\Test;
|
||||
|
||||
use Amp\Postgres\{ Connection, PqConnection };
|
||||
|
||||
/**
|
||||
* @requires extension pq
|
||||
*/
|
||||
class PqConnectionTest extends AbstractConnectionTest {
|
||||
/** @var resource PostgreSQL connection resource. */
|
||||
protected $handle;
|
||||
|
Loading…
Reference in New Issue
Block a user