Esempio n. 1
0
 /**
  * Invoke creditmemo add comment service
  *
  * @param \Magento\Sales\Service\V1\Data\Comment $comment
  * @return bool
  * @throws \Exception
  */
 public function invoke(Comment $comment)
 {
     /** @var \Magento\Sales\Model\Order\Creditmemo\Comment $commentModel */
     $commentModel = $this->commentConverter->getModel($comment);
     $commentModel->save();
     return true;
 }
Esempio n. 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));
 }