Exemple #1
0
 /**
  * @param int $id
  * @return bool
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function cancel($id)
 {
     return $this->creditmemoCancel->invoke($id);
 }
Exemple #2
0
 /**
  * test creditmemo cancel service
  */
 public function testInvoke()
 {
     $this->creditmemoRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->creditmemoMock));
     $this->creditmemoMock->expects($this->once())->method('cancel')->will($this->returnSelf());
     $this->assertTrue($this->creditmemoCancel->invoke(1));
 }
Exemple #3
0
 /**
  * test creditmemo cancel
  */
 public function testCancel()
 {
     $this->creditmemoCancelMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue(true));
     $this->assertTrue($this->creditmemoWrite->cancel(1));
 }