示例#1
0
 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\TestFramework\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\TestFramework\Event\Param\Transaction();
     } else {
         $this->_eventParam->__construct();
     }
     return $this->_eventParam;
 }