public function reauthorize($apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); $payLoad = $this->toJSON(); $json = self::executeCall("/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad, null, $apiContext, $restCall); $this->fromJson($json); return $this; }
/** * @dataProvider mockProvider * @param Authorization $obj */ public function testReauthorize($obj, $mockApiContext) { $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson())); $result = $obj->reauthorize($mockApiContext, $mockPPRestCall); $this->assertNotNull($result); }