/** * @dataProvider mockProvider * @param Webhook $obj */ public function testGet($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookTest::getJson())); $result = $obj->get("webhookId", $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }
/** * Gets Json String of Object WebhookList * @return string */ public static function getJson() { return '{"webhooks":' . WebhookTest::getJson() . '}'; }