/** * @dataProvider mockProvider * @param WebhookEvent $obj */ public function testGet($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookEventTest::getJson())); $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }
/** * Gets Json String of Object WebhookEventList * @return string */ public static function getJson() { return '{"events":' . WebhookEventTest::getJson() . ',"count":123,"links":' . LinksTest::getJson() . '}'; }
/** * Gets Json String of Object VerifyWebhookSignature * @return string */ public static function getJson() { return '{"auth_algo":"TestSample","cert_url":"http://www.google.com","transmission_id":"TestSample","transmission_sig":"TestSample","transmission_time":"TestSample","webhook_id":"TestSample","webhook_event":' . WebhookEventTest::getJson() . '}'; }