X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=tests%2Flib%2Fpq%2FGateway%2FRowsetTest.php;fp=tests%2Flib%2Fpq%2FGateway%2FRowsetTest.php;h=48ac624574615cc366a655835c34cfc56350b72e;hp=7ef1a0eb21721a374ba36b41c59108197b08b387;hb=0e2eb1f13ef60ce9a8709354136c42f7d87b2345;hpb=7045a269b4993d414337fcd7ee1b789b15185af4 diff --git a/tests/lib/pq/Gateway/RowsetTest.php b/tests/lib/pq/Gateway/RowsetTest.php index 7ef1a0e..48ac624 100644 --- a/tests/lib/pq/Gateway/RowsetTest.php +++ b/tests/lib/pq/Gateway/RowsetTest.php @@ -17,16 +17,17 @@ class RowsetTest extends \PHPUnit_Framework_TestCase { protected $table; protected function setUp() { - $this->conn = new \pq\Connection(PQ_DSN); - $this->conn->exec(PQ_TEST_DROP_TABLE); - $this->conn->exec(PQ_TEST_CREATE_TABLE); - $this->conn->exec(PQ_TEST_CREATE_DATA); - - $this->table = new Table(PQ_TEST_TABLE_NAME, $this->conn); + $this->conn = new \pq\Connection(PQ_TEST_DSN); + $this->conn->exec(PQ_TEST_TABLE_CREATE); + $this->conn->exec(PQ_TEST_REFTABLE_CREATE); + $this->conn->exec(PQ_TEST_DATA); + Table::$defaultConnection = $this->conn; + $this->table = new Table("test"); } protected function tearDown() { - $this->conn->exec(PQ_TEST_DROP_TABLE); + $this->conn->exec(PQ_TEST_REFTABLE_DROP); + $this->conn->exec(PQ_TEST_TABLE_DROP); } public function test__invoke() {