/** * {@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 testExecuteDefault() { // Verify view is called to load and render $this->viewMock->expects($this->once())->method('loadLayout')->with(['default', 'noCookie']); $this->viewMock->expects($this->once())->method('renderLayout'); // Verify request is set to dispatched $this->requestMock->expects($this->once())->method('setDispatched')->with($this->isTrue()); // Make the call to test $this->controller->execute(); }