X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=tests%2Flib%2Fpq%2FGateway%2FTableTest.php;h=a5fb56f6acb39cb3485b1d03b1ac14c53d4e284b;hp=65c93f717b483923d5bd87c935165ff528f5b8f2;hb=0e2eb1f13ef60ce9a8709354136c42f7d87b2345;hpb=4879955d1b86d606dc24401f26ebde9be7612fbf diff --git a/tests/lib/pq/Gateway/TableTest.php b/tests/lib/pq/Gateway/TableTest.php index 65c93f7..a5fb56f 100644 --- a/tests/lib/pq/Gateway/TableTest.php +++ b/tests/lib/pq/Gateway/TableTest.php @@ -17,21 +17,19 @@ class TableTest 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 = 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(PQ_TEST_TABLE_NAME); + $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); } - protected function createTestData() { - $this->conn->exec(PQ_TEST_CREATE_DATA); - } - public function testSetRowsetPrototype() { $prop = new \ReflectionProperty("\\pq\\Gateway\\Table", "rowset"); $prop->setAccessible(true); @@ -48,7 +46,7 @@ class TableTest extends \PHPUnit_Framework_TestCase { } public function testGetName() { - $this->assertSame(PQ_TEST_TABLE_NAME, $this->table->getName()); + $this->assertSame("test", $this->table->getName()); } public function testFind() {