Esempio n. 1
0
 /**
  * test invoice void
  */
 public function testVoid()
 {
     $this->invoiceVoidMock->expects($this->once())->method('invoke')->with(1)->will($this->returnValue(true));
     $this->assertTrue($this->invoiceWrite->void(1));
 }
Esempio n. 2
0
 /**
  * @param int $id
  * @return bool
  * @throws \Magento\Framework\Exception\NoSuchEntityException
  */
 public function void($id)
 {
     return $this->invoiceVoid->invoke($id);
 }
Esempio n. 3
0
 /**
  * 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));
 }