function testOptimisticLockFail() { $this->table->attach(new Table\OptimisticLock("counter")); $row = $this->table->find(null, null, 1)->current(); $row->data = "foo"; executeInConcurrentTransaction($this->table->getQueryExecutor(), "UPDATE {$this->table->getName()} SET counter = 10 WHERE id=\$1", array($row->id->get())); $this->setExpectedException("\\UnexpectedValueException", "No row updated"); $row->update(); }