コード例 #1
0
ファイル: TransactionTest.php プロジェクト: nemphys/magento2
 public function testConstructor()
 {
     $this->_object->requestTransactionStart();
     $this->_object->requestTransactionRollback();
     $this->_object->__construct($this);
     $this->assertFalse($this->_object->isTransactionStartRequested());
     $this->assertFalse($this->_object->isTransactionRollbackRequested());
 }
コード例 #2
0
 /**
  * Retrieve clean instance of transaction event parameter
  *
  * @return Magento_Test_Event_Param_Transaction
  */
 protected function _getEventParam()
 {
     /* reset object state instead of instantiating new object over and over again */
     if (!$this->_eventParam) {
         $this->_eventParam = new Magento_Test_Event_Param_Transaction();
     } else {
         $this->_eventParam->__construct();
     }
     return $this->_eventParam;
 }