forked from LiveCarta/PayPal-PHP-SDK
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user