コード例 #1
0
ファイル: IndexTest.php プロジェクト: Doability/magento2dev
 /**
  * @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();
 }
コード例 #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);
     }
 }
コード例 #3
0
ファイル: Interceptor.php プロジェクト: rustamveer/magento2
 /**
  * {@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);
     }
 }