예제 #1
0
 /**
  * @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());
 }