X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Flib%2Fpq%2FGateway%2FRowTest.php;h=7b88e1993b298c894b2746622613068aaa684628;hb=c236ef4b1efd3f5d3a03a390f9a3721b06fa1e72;hp=1d339639c27d5cda471ce5a68589750b9a3e1b23;hpb=348c73cdaf65cf9df2d6f582a96bf8694f1255f5;p=m6w6%2Fpq-gateway diff --git a/tests/lib/pq/Gateway/RowTest.php b/tests/lib/pq/Gateway/RowTest.php index 1d33963..7b88e19 100644 --- a/tests/lib/pq/Gateway/RowTest.php +++ b/tests/lib/pq/Gateway/RowTest.php @@ -38,7 +38,9 @@ class RowTest extends \PHPUnit_Framework_TestCase { "created" => new \pq\DateTime("tomorrow"), "counter" => "1", "number" => "1.1", - "data" => "tomorrow" + "data" => "tomorrow", + "list" => array(1,2,3), + "prop" => null ), $row->getData() ); @@ -51,7 +53,7 @@ class RowTest extends \PHPUnit_Framework_TestCase { } function testPessimisticLock() { - $this->table->setLock(new Table\PessimisticLock); + $this->table->attach(new Table\PessimisticLock); $txn = $this->table->getConnection()->startTransaction(); $row = $this->table->find(null, null, 1)->current(); $row->data = "foo"; @@ -61,7 +63,7 @@ class RowTest extends \PHPUnit_Framework_TestCase { } function testPessimisticLockFail() { - $this->table->setLock(new Table\PessimisticLock); + $this->table->attach(new Table\PessimisticLock); $txn = $this->table->getConnection()->startTransaction(); $row = $this->table->find(null, null, 1)->current(); $row->data = "foo"; @@ -75,7 +77,7 @@ class RowTest extends \PHPUnit_Framework_TestCase { } function testOptimisticLock() { - $this->table->setLock(new Table\OptimisticLock("counter")); + $this->table->attach(new Table\OptimisticLock("counter")); $row = $this->table->find(null, null, 1)->current(); $cnt = $row->counter->get(); $row->data = "foo"; @@ -85,7 +87,7 @@ class RowTest extends \PHPUnit_Framework_TestCase { } function testOptimisticLockFail() { - $this->table->setLock(new Table\OptimisticLock("counter")); + $this->table->attach(new Table\OptimisticLock("counter")); $row = $this->table->find(null, null, 1)->current(); $row->data = "foo"; executeInConcurrentTransaction(