コード例 #1
0
ファイル: CreditmemoRead.php プロジェクト: aiesh/magento2
 /**
  * @param int $id
  * @return \Magento\Sales\Service\V1\Data\Creditmemo
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function get($id)
 {
     return $this->creditmemoGet->invoke($id);
 }
コード例 #2
0
 /**
  * Test creditmemo get service
  */
 public function testInvoke()
 {
     $this->creditmemoRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->creditmemoMock));
     $this->creditmemoMapperMock->expects($this->once())->method('extractDto')->with($this->equalTo($this->creditmemoMock))->will($this->returnValue($this->dataObjectMock));
     $this->assertEquals($this->dataObjectMock, $this->creditmemoGet->invoke(1));
 }