getJson() public static method

Gets Json String of Object Payment
public static getJson ( ) : string
return string
 /**
  * Gets Json String of Object PaymentHistory
  * @return string
  */
 public static function getJson()
 {
     return '{"payments":' . PaymentTest::getJson() . ',"count":123,"next_id":"TestSample"}';
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider mockProvider
  * @param Payment $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(PaymentTest::getJson()));
     $result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }