/** * @covers \Magento\Authorizenet\Controller\Directpost\Payment\Redirect::execute */ public function testExecute() { $url = 'http://test.com/redirect?=test'; $params = ['order_success' => $url]; $this->request->expects(static::once())->method('getParams')->willReturn($params); $this->coreRegistry->expects(static::once())->method('register')->with(Iframe::REGISTRY_KEY, []); $this->view->expects(static::once())->method('addPageLayoutHandles'); $this->view->expects(static::once())->method('loadLayout')->with(false)->willReturnSelf(); $this->view->expects(static::once())->method('renderLayout'); $this->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); } }