1
0
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:
Aaron Piotrowski 2016-09-20 00:47:16 -05:00
parent 23129d66b5
commit 87809b70d1
5 changed files with 15 additions and 6 deletions

View File

@ -4,8 +4,7 @@ namespace Amp\Postgres\Test;
use Amp\Postgres\AggregatePool;
class AggregatePoolTest extends AbstractPoolTest
{
class AggregatePoolTest extends AbstractPoolTest {
/**
* @param array $connections
*

View File

@ -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
*

View File

@ -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);

View File

@ -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;

View File

@ -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;