Example #1
0
 /**
  * @param \Magento\Sales\Service\V1\Data\Comment $comment
  * @return bool
  * @throws \Exception
  */
 public function addComment(Comment $comment)
 {
     return $this->creditmemoAddComment->invoke($comment);
 }
Example #2
0
 /**
  * Test creditmemo 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->creditmemoAddComment->invoke($this->dataObjectMock));
 }
Example #3
0
 /**
  * test creditmemo add comment
  */
 public function testAddComment()
 {
     $comment = $this->getMock('Magento\\Sales\\Service\\V1\\Data\\Comment', [], [], '', false);
     $this->creditmemoAddCommentMock->expects($this->once())->method('invoke')->with($comment)->will($this->returnValue(true));
     $this->assertTrue($this->creditmemoWrite->addComment($comment));
 }