public function testIndexActionException() { $this->request->expects($this->once())->method('isPost')->will($this->returnValue(true)); $exception = new \Exception(); $this->request->expects($this->once())->method('getPostValue')->will($this->throwException($exception)); $this->logger->expects($this->once())->method('critical')->with($this->identicalTo($exception)); $this->response->expects($this->once())->method('setHttpResponseCode')->with(500); $this->model->executeInternal(); }
/** * {@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); } }