/** * test invoice get service */ public function testInvoke() { $this->invoiceRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->invoiceMock)); $this->invoiceMapperMock->expects($this->once())->method('extractDto')->with($this->equalTo($this->invoiceMock))->will($this->returnValue($this->dataObjectMock)); $this->assertEquals($this->dataObjectMock, $this->invoiceGet->invoke(1)); }
/** * @param int $id * @return \Magento\Sales\Service\V1\Data\Invoice * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function get($id) { return $this->invoiceGet->invoke($id); }