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 product combine model instance * * @return \Magento\SalesRule\Model\Rule\Condition\Product\Combine */ public function getActionsInstance() { return $this->_condProdCombineF->create(); }