/** * {@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); } }
public function testBeforeSave() { $this->assertEquals(null, $this->model->getUpdated()); $this->model->beforeSave(); $this->assertTrue($this->model->getUpdated() != null); }