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

getJson() public static method

Gets Json String of Object WebhookEvent
public static getJson ( ) : string
return string
    public static function getJson()
    {
        return '{"id":"TestSample","create_time":"TestSample","resource_type":"TestSample","event_version":"TestSample","event_type":"TestSample","summary":"TestSample","resource":"TestSampleObject","status":"TestSample","transmissions":"TestSampleObject","links":' . LinksTest::getJson() . '}';
    }

Usage Example

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