getJson() public static method

Gets Json String of Object Sale
public static getJson ( ) : string
return string
示例#1
0
文件: SaleTest.php 项目: Roc4rdho/app
 /**
  * @dataProvider mockProvider
  * @param Sale $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(SaleTest::getJson()));
     $result = $obj->get("saleId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
示例#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() . '}';
 }