X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fpq-gateway;a=blobdiff_plain;f=tests%2Flib%2Fpq%2FGateway%2FRowTest.php;h=7b88e1993b298c894b2746622613068aaa684628;hp=c4adf8ce6a1482b041e84082bf051874e2bab073;hb=c236ef4b1efd3f5d3a03a390f9a3721b06fa1e72;hpb=cf4c83fd909161f6bfb448dca0f731e76b76a41c diff --git a/tests/lib/pq/Gateway/RowTest.php b/tests/lib/pq/Gateway/RowTest.php index c4adf8c..7b88e19 100644 --- a/tests/lib/pq/Gateway/RowTest.php +++ b/tests/lib/pq/Gateway/RowTest.php @@ -53,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"; @@ -63,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"; @@ -77,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"; @@ -87,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(