PayPal\Test\Api\WebhookTest::getJson PHP Method

getJson() public static method

Gets Json String of Object Webhook
public static getJson ( ) : string
return string
    public static function getJson()
    {
        return '{"id":"TestSample","url":"http://www.google.com","event_types":' . WebhookEventTypeTest::getJson() . ',"links":' . LinksTest::getJson() . '}';
    }

Usage Example

Beispiel #1
0
 /**
  * @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);
 }
All Usage Examples Of PayPal\Test\Api\WebhookTest::getJson