/** * {@inheritdoc} */ public function execute() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'execute'); if (!$pluginInfo) { return parent::execute(); } else { return $this->___callPlugins('execute', func_get_args(), $pluginInfo); } }
/** * @covers \Magento\Sales\Controller\Adminhtml\Order\View::execute */ public function testGlobalException() { $id = 111; $exception = new \Exception(); $this->initOrder(); $this->initOrderSuccess($id); $this->prepareRedirect(); $this->resultPageFactoryMock->expects($this->once())->method('create')->willThrowException($exception); $this->loggerMock->expects($this->once())->method('critical')->with($exception); $this->messageManagerMock->expects($this->once())->method('addError')->with('Exception occurred during order load')->willReturnSelf(); $this->setPath('sales/order/index'); $this->assertInstanceOf('Magento\\Backend\\Model\\View\\Result\\Redirect', $this->viewAction->execute()); }