/** * @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); }
/** * Gets Json String of Object PayoutBatch * @return string */ public static function getJson() { return '{"batch_header":' . PayoutBatchHeaderTest::getJson() . ',"items":' . PayoutItemDetailsTest::getJson() . '}'; }