示例#1
0
 /**
  * Run test execute method (delete exception)
  */
 public function testExecuteDeleteFail()
 {
     $errors = ['error' => true, 'message' => 'Cannot delete tracking number.'];
     $this->shipmentLoad();
     $this->shipmentLoaderMock->expects($this->once())->method('load')->will($this->returnValue($this->shipmentMock));
     $this->shipmentTrackMock->expects($this->once())->method('delete')->will($this->throwException(new \Exception()));
     $this->representJson($errors);
     $this->assertNull($this->controller->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);
     }
 }