Ejemplo n.º 1
0
 /**
  * test invoice get
  */
 public function testGet()
 {
     $this->invoiceGetMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue('invoice-do'));
     $this->assertEquals('invoice-do', $this->invoiceRead->get(1));
 }
Ejemplo n.º 2
0
 /**
  * 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));
 }
Ejemplo n.º 3
0
 /**
  * @param int $id
  * @return \Magento\Sales\Service\V1\Data\Invoice
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function get($id)
 {
     return $this->invoiceGet->invoke($id);
 }