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(); }
/** * {@inheritdoc} */ public function beforeSave() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'beforeSave'); if (!$pluginInfo) { return parent::beforeSave(); } else { return $this->___callPlugins('beforeSave', func_get_args(), $pluginInfo); } }