public function testExecuteWhenCustomerAddressBlockNotExist()
 {
     $this->viewMock->expects($this->once())->method('loadLayout')->willReturnSelf();
     $this->viewMock->expects($this->any())->method('getLayout')->willReturn($this->layoutMock);
     $this->layoutMock->expects($this->once())->method('getBlock')->with('customer_address_edit');
     $this->urlMock->expects($this->never())->method('getUrl');
     $this->viewMock->expects($this->once())->method('renderLayout');
     $this->controller->execute();
 }
Example #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);
     }
 }