コード例 #1
0
ファイル: InvoiceWrite.php プロジェクト: aiesh/magento2
 /**
  * @param int $id
  * @return bool
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function capture($id)
 {
     return $this->invoiceCapture->invoke($id);
 }
コード例 #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));
 }
コード例 #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));
 }