Cancels an invoice, by ID.
public cancel ( |
||
$cancelNotification | ||
$apiContext | is the APIContext for this call. It can be used to pass dynamic configuration and credentials. | |
$restCall | is the Rest Call Service that is used to make rest calls | |
리턴 | boolean |
/** * @dataProvider mockProvider * @param Invoice $obj */ public function testCancel($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true)); $cancelNotification = CancelNotificationTest::getObject(); $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }