Skip to content

Commit

Permalink
#7760: M2.1.2 : Shipment Tracking REST API should throw an error if o…
Browse files Browse the repository at this point in the history
…rder doesn't exist.
  • Loading branch information
RomaKis committed Jan 4, 2018
1 parent 1b3304a commit a732ff6
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -89,6 +89,8 @@ protected function setUp()
*/
public function testSave()
{
$shipmentMock = $this->createMock(\Magento\Sales\Model\Order\Shipment::class);
$orderMock = $this->createMock(\Magento\Sales\Model\Order::class);
$this->entitySnapshotMock->expects($this->once())
->method('isModified')
->with($this->trackModelMock)
Expand All @@ -98,6 +100,8 @@ public function testSave()
->with($this->equalTo($this->trackModelMock))
->will($this->returnValue([]));
$this->trackModelMock->expects($this->any())->method('getData')->willReturn([]);
$this->trackModelMock->expects($this->atLeastOnce())->method('getShipment')->willReturn($shipmentMock);
$shipmentMock->expects($this->atLeastOnce())->method('getOrder')->willReturn($orderMock);
$this->trackResource->save($this->trackModelMock);
$this->assertTrue(true);
}
Expand Down

0 comments on commit a732ff6

Please sign in to comment.