Beispiel #1
0
 /**
  * Test shipment remove track
  */
 public function testInvoke()
 {
     $this->trackRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->trackMock));
     $this->trackMock->expects($this->once())->method('delete');
     $this->assertTrue($this->shipmentRemoveTrack->invoke(1));
 }
Beispiel #2
0
 /**
  * test shipment removeTrack
  */
 public function testRemoveTrack()
 {
     $track = $this->getMock('Magento\\Sales\\Service\\V1\\Data\\ShipmentTrack', [], [], '', false);
     $this->shipmentRemoveTrackMock->expects($this->once())->method('invoke')->with($track)->will($this->returnValue(true));
     $this->assertTrue($this->shipmentWrite->removeTrack($track));
 }
Beispiel #3
0
 /**
  * @param int $id
  * @return bool
  * @throws \Exception
  */
 public function removeTrack($id)
 {
     return $this->shipmentRemoveTrack->invoke($id);
 }