コード例 #1
0
ファイル: InvoiceWrite.php プロジェクト: aiesh/magento2
 /**
  * @param \Magento\Sales\Service\V1\Data\Comment $comment
  * @return bool
  * @throws \Exception
  */
 public function addComment(Comment $comment)
 {
     return $this->invoiceAddComment->invoke($comment);
 }
コード例 #2
0
 /**
  * Test invoice add comment service
  */
 public function testInvoke()
 {
     $this->commentConverterMock->expects($this->once())->method('getModel')->with($this->equalTo($this->dataObjectMock))->will($this->returnValue($this->dataModelMock));
     $this->dataModelMock->expects($this->once())->method('save');
     $this->assertTrue($this->invoiceAddComment->invoke($this->dataObjectMock));
 }