Ejemplo n.º 1
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);
     }
 }
Ejemplo n.º 2
0
 public function testDeleteActionForServiceGenericException()
 {
     $intData = $this->_getSampleIntegrationData();
     $this->_integrationSvcMock->expects($this->any())->method('get')->with($this->anything())->willReturn($intData);
     $this->_requestMock->expects($this->once())->method('getParam')->willReturn(self::INTEGRATION_ID);
     // Use real translate model
     $this->_translateModelMock = null;
     $exceptionMessage = __("Integration with ID '%1' doesn't exist.", $intData[Info::DATA_ID]);
     $invalidIdException = new \Exception($exceptionMessage);
     $this->_integrationSvcMock->expects($this->once())->method('delete')->willThrowException($invalidIdException);
     $this->_messageManager->expects($this->never())->method('addError');
     $this->integrationController->executeInternal();
 }