/** * @param int $id * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException */ public function void($id) { return $this->invoiceVoid->invoke($id); }
/** * test invoice void 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('void')->will($this->returnSelf()); $this->assertTrue($this->invoiceVoid->invoke(1)); }