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(); }
/** * Get rule condition combine model instance * * @return \Magento\SalesRule\Model\Rule\Condition\Combine */ public function getConditionsInstance() { return $this->_condCombineFactory->create(); }