Ejemplo n.º 1
0
 /**
  * @return void
  */
 public function testExecuteWithLocalizedException()
 {
     $errorText = new Phrase('Error');
     $this->messageManagerMock->expects($this->once())->method('addError')->with($errorText);
     $this->menuBlockMock->expects($this->once())->method('setActive')->willThrowException(new \Magento\Framework\Exception\LocalizedException($errorText));
     $this->viewed->execute();
 }
Ejemplo 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);
     }
 }