Exemple #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());
 }