/** * @param int $id * @return \Magento\Sales\Service\V1\Data\Order * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function get($id) { return $this->orderGet->invoke($id); }
/** * test order list service */ public function testInvoke() { $this->orderRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->orderMock)); $this->orderMapperMock->expects($this->once())->method('extractDto')->with($this->equalTo($this->orderMock))->will($this->returnValue($this->dataObjectMock)); $this->assertEquals($this->dataObjectMock, $this->orderGet->invoke(1)); }