PayPal\Test\Api\InvoiceTest::testCancel PHP Method

testCancel() public method

public testCancel ( Invoice $obj, $mockApiContext )
$obj PayPal\Api\Invoice
    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);
    }