/** * 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)); }
/** * @param int $id * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function capture($id) { return $this->invoiceCapture->invoke($id); }