public function testExecute() { $productCompositeHelper = $this->getMock('Magento\\Catalog\\Helper\\Product\\Composite', [], [], '', false); $productCompositeHelper->expects($this->once())->method('renderUpdateResult'); $productBuilder = $this->getMock('Magento\\Catalog\\Controller\\Adminhtml\\Product\\Builder', [], [], '', false); $context = $this->getContext(); /** @var \Magento\Catalog\Controller\Adminhtml\Product\ShowUpdateResult $controller */ $controller = new ShowUpdateResult($context, $productBuilder, $productCompositeHelper); $controller->execute(); }
/** * {@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); } }