Exemple #1
0
 /**
  * @param int $id
  * @return bool
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function capture($id)
 {
     return $this->invoiceCapture->invoke($id);
 }
Exemple #2
0
 /**
  * test invoice capture service
  */
 public function testInvoke()
 {
     $this->invoiceRepositoryMock->expects($this->once())->method('get')->with($this->equalTo(1))->will($this->returnValue($this->invoiceMock));
     $this->invoiceMock->expects($this->once())->method('capture')->will($this->returnSelf());
     $this->assertTrue($this->invoiceCapture->invoke(1));
 }
Exemple #3
0
 /**
  * test invoice capture
  */
 public function testCapture()
 {
     $this->invoiceCaptureMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue(true));
     $this->assertTrue($this->invoiceWrite->capture(1));
 }