getJson() public static method

Gets Json String of Object Order
public static getJson ( ) : string
return string
Esempio n. 1
0
 /**
  * @dataProvider mockProvider
  * @param Order $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(OrderTest::getJson()));
     $result = $obj->get("orderId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
Esempio n. 2
0
 /**
  * Gets Json String of Object RelatedResources
  *
  * @return string
  */
 public static function getJson()
 {
     return '{"sale":' . SaleTest::getJson() . ',"authorization":' . AuthorizationTest::getJson() . ',"order":' . OrderTest::getJson() . ',"capture":' . CaptureTest::getJson() . ',"refund":' . RefundTest::getJson() . '}';
 }