getJson() public static method

Gets Json String of Object Invoice
public static getJson ( ) : string
return string
 /**
  * Gets Json String of Object InvoiceSearchResponse
  * @return string
  */
 public static function getJson()
 {
     return '{"total_count":123,"invoices":' . InvoiceTest::getJson() . '}';
 }
Exemplo n.º 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);
 }