/** * test shipment get service */ public function testInvoke() { $this->shipmentRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->shipmentMock)); $this->shipmentMapperMock->expects($this->once())->method('extractDto')->with($this->equalTo($this->shipmentMock))->will($this->returnValue($this->dataObjectMock)); $this->assertEquals($this->dataObjectMock, $this->shipmentGet->invoke(1)); }
/** * @param int $id * @return \Magento\Sales\Service\V1\Data\Shipment * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function get($id) { return $this->shipmentGet->invoke($id); }