Example #1
0
 /**
  * {@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);
     }
 }
Example #2
0
 public function testExecuteInternalSuccess()
 {
     $params = ['success' => 1, 'controller_action_name' => 'action', 'x_invoice_num' => 1];
     $this->requestMock->expects($this->once())->method('getParams')->willReturn($params);
     $this->helperMock->expects($this->once())->method('getSuccessOrderUrl')->willReturn('redirect_parent_url');
     $this->directpostSessionMock->expects($this->once())->method('unsetData')->with('quote_id');
     $this->orderMock->expects($this->once())->method('getId')->willReturn(null);
     $this->sessionQuoteMock->expects($this->atLeastOnce())->method('getOrder')->willReturn($this->orderMock);
     $this->adminOrderCreateMock->expects($this->atLeastOnce())->method('getSession')->willReturn($this->sessionQuoteMock);
     $this->coreRegistryMock->expects($this->once())->method('register')->with(Iframe::REGISTRY_KEY);
     $this->assertInstanceOf('\\Magento\\Framework\\View\\Result\\Layout', $this->controller->executeInternal());
 }