/** * {@inheritdoc} */ public function dispatch(\Magento\Framework\App\RequestInterface $request) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'dispatch'); if (!$pluginInfo) { return parent::dispatch($request); } else { return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo); } }
public function testIndexActionSaveAdvanced() { $this->_sectionCheckerMock->expects($this->any())->method('isSectionAllowed')->will($this->returnValue(true)); $requestParamMap = [['section', null, 'advanced'], ['website', null, 'test_website'], ['store', null, 'test_store']]; $this->_requestMock->expects($this->any())->method('getParam')->will($this->returnValueMap($requestParamMap)); $backendConfigMock = $this->getMock('Magento\\Config\\Model\\Config', [], [], '', false, false); $this->_configFactoryMock->expects($this->once())->method('create')->will($this->returnValue($backendConfigMock)); $backendConfigMock->expects($this->once())->method('save'); $this->_cacheMock->expects($this->once())->method('clean')->with(\Zend_Cache::CLEANING_MODE_ALL); $this->assertEquals($this->resultRedirect, $this->_controller->execute()); }
/** * {@inheritdoc} */ public function getResponse() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getResponse'); if (!$pluginInfo) { return parent::getResponse(); } else { return $this->___callPlugins('getResponse', func_get_args(), $pluginInfo); } }