/** * Test incomplete Roll Back in a nested transaction */ public function testSequentialTransactionsSuccess() { $this->_adapter->expects($this->exactly(4))->method('_connect'); $this->_adapter->expects($this->exactly(2))->method('_beginTransaction'); $this->_adapter->expects($this->once())->method('_rollBack'); $this->_adapter->expects($this->once())->method('_commit'); $this->_adapter->beginTransaction(); $this->_adapter->beginTransaction(); $this->_adapter->beginTransaction(); $this->_adapter->rollBack(); $this->_adapter->rollBack(); $this->_adapter->rollBack(); $this->_adapter->beginTransaction(); $this->_adapter->commit(); }
/** * Commit transaction * * @return $this */ public function commitTransaction() { $this->_write->commit(); $this->_resourceHelper->restoreTransactionIsolationLevel(); return $this; }