public function testRequestTransactionRollback() { $this->assertFalse($this->_object->isTransactionRollbackRequested()); $this->_object->requestTransactionRollback(); $this->assertTrue($this->_object->isTransactionRollbackRequested()); }
/** * Handler for 'endTestNeedTransactionRollback' event * * @param PHPUnit_Framework_TestCase $test * @param Magento_Test_Event_Param_Transaction $param */ public function endTestTransactionRequest(PHPUnit_Framework_TestCase $test, Magento_Test_Event_Param_Transaction $param) { /* Isolate other tests from test-specific fixtures */ if ($this->_appliedFixtures && $this->_getFixtures('method', $test)) { $param->requestTransactionRollback(); } }
/** * Handler for 'endTestTransactionRequest' event * * @param PHPUnit_Framework_TestCase $test * @param Magento_Test_Event_Param_Transaction $param */ public function endTestTransactionRequest(PHPUnit_Framework_TestCase $test, Magento_Test_Event_Param_Transaction $param) { if ($this->_isIsolationActive && $this->_getIsolation('method', $test)) { $param->requestTransactionRollback(); } }