Esempio n. 1
0
 /**
  * @covers \Magento\Marketplace\Controller\Adminhtml\Partners\Index::execute
  */
 public function testExecute()
 {
     $requestMock = $this->getRequestMock(['isAjax']);
     $requestMock->expects($this->once())->method('isAjax')->will($this->returnValue(true));
     $this->partnersControllerMock->expects($this->once())->method('getRequest')->will($this->returnValue($requestMock));
     $layoutMock = $this->getLayoutMock();
     $blockMock = $this->getBlockInterfaceMock();
     $blockMock->expects($this->once())->method('toHtml')->will($this->returnValue(''));
     $layoutMock->expects($this->once())->method('createBlock')->will($this->returnValue($blockMock));
     $layoutMockFactory = $this->getLayoutFactoryMock(['create']);
     $layoutMockFactory->expects($this->once())->method('create')->will($this->returnValue($layoutMock));
     $this->partnersControllerMock->expects($this->once())->method('getLayoutFactory')->will($this->returnValue($layoutMockFactory));
     $responseMock = $this->getResponseMock(['appendBody']);
     $responseMock->expects($this->once())->method('appendBody')->will($this->returnValue(''));
     $this->partnersControllerMock->expects($this->once())->method('getResponse')->will($this->returnValue($responseMock));
     $this->partnersControllerMock->execute();
 }
Esempio n. 2
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);
     }
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function getResponse()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getResponse');
     if (!$pluginInfo) {
         return parent::getResponse();
     } else {
         return $this->___callPlugins('getResponse', func_get_args(), $pluginInfo);
     }
 }