示例#1
0
 public function testBeforeSaveResetConditionToNull()
 {
     $conditionMock = $this->setupConditionMock();
     //Make sure that we reset _condition in beforeSave method
     $this->conditionCombineFactoryMock->expects($this->exactly(2))->method('create')->willReturn($conditionMock);
     $prodConditionMock = $this->setupProdConditionMock();
     $this->condProdCombineFactoryMock->expects($this->exactly(2))->method('create')->willReturn($prodConditionMock);
     $this->model->beforeSave();
     $this->model->getConditions();
     $this->model->getActions();
 }
示例#2
0
 /**
  * Get rule condition combine model instance
  *
  * @return \Magento\SalesRule\Model\Rule\Condition\Combine
  */
 public function getConditionsInstance()
 {
     return $this->_condCombineFactory->create();
 }