Example #1
0
 /**
  * @param int $id
  * @return bool
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function cancel($id)
 {
     return $this->orderCancel->invoke($id);
 }
Example #2
0
 /**
  * test order cancel service
  */
 public function testInvoke()
 {
     $this->orderRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->orderMock));
     $this->orderMock->expects($this->once())->method('cancel')->will($this->returnSelf());
     $this->assertTrue($this->orderCancel->invoke(1));
 }
Example #3
0
 /**
  * test order cancel
  */
 public function testCancel()
 {
     $this->orderCancelMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue(true));
     $this->assertTrue($this->orderWrite->cancel(1));
 }