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

Gets Json String of Object Invoice
public static getJson ( ) : string
Результат string
 /**
  * Gets Json String of Object InvoiceSearchResponse
  * @return string
  */
 public static function getJson()
 {
     return '{"total_count":123,"invoices":' . InvoiceTest::getJson() . '}';
 }
Пример #2
0
 /**
  * @dataProvider mockProvider
  * @param Invoice $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(InvoiceTest::getJson()));
     $result = $obj->get("invoiceId", $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }