Enabled Payout Cancel API for Unclaimed Payout Item

- PayoutItem supports [Cancel and Unclaimed Payout Item](https://developer.paypal.com/docs/api/#cancel-an-unclaimed-payout-item)
- Updated Unit and Functional Tests Accordingly
- Updated Samples accordingly
This commit is contained in:
japatel
2015-01-23 13:50:51 -06:00
parent d9a5baf202
commit d84ddf85c9
11 changed files with 274 additions and 132 deletions

View File

@@ -85,6 +85,26 @@ class PayoutItemTest extends \PHPUnit_Framework_TestCase
$this->assertNotNull($result);
}
/**
* @dataProvider mockProvider
* @param PayoutItem $obj
*/
public function testCancel($obj, $mockApiContext)
{
$mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
$mockPPRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PayoutItemDetailsTest::getJson()
));
$result = $obj->cancel("payoutItemId", $mockApiContext, $mockPPRestCall);
$this->assertNotNull($result);
}
public function mockProvider()
{
$obj = self::getObject();