コード例 #1
0
ファイル: IndexTest.php プロジェクト: Doability/magento2dev
 /**
  * @covers \Magento\Customer\Controller\Adminhtml\Index\Index::execute
  */
 public function testExecuteAjax()
 {
     $this->prepareExecute(true);
     $this->resultForwardFactoryMock->expects($this->once())->method('create')->willReturn($this->resultForwardMock);
     $this->resultForwardMock->expects($this->once())->method('forward')->with('grid')->willReturnSelf();
     $this->assertInstanceOf('Magento\\Backend\\Model\\View\\Result\\Forward', $this->indexController->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
 public function testExecute()
 {
     $this->layoutMock->expects($this->at(0))->method('getBlock')->with('menu')->willReturn($this->menuBlockMock);
     $this->layoutMock->expects($this->at(1))->method('getBlock')->with('breadcrumbs')->willReturn($this->breadcrumbsBlockMock);
     $this->layoutMock->expects($this->at(2))->method('getBlock')->with('breadcrumbs')->willReturn($this->breadcrumbsBlockMock);
     $this->requestMock->expects($this->once())->method('getQuery')->with('ajax')->willReturn(false);
     $this->sessionMock->expects($this->once())->method('unsCustomerData');
     $this->assertNull($this->controller->execute());
 }