PayPal\Test\Api\WebhookEventListTest::getJson PHP Метод

getJson() публичный статический Метод

Gets Json String of Object WebhookEventList
public static getJson ( ) : string
Результат string
    public static function getJson()
    {
        return '{"events":' . WebhookEventTest::getJson() . ',"count":123,"links":' . LinksTest::getJson() . '}';
    }

Usage Example

 /**
  * @dataProvider mockProvider
  * @param WebhookEvent $obj
  */
 public function testList($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookEventListTest::getJson()));
     $params = array();
     $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }