PayPal\Test\Api\OrderTest::getJson PHP Метод

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

Gets Json String of Object Order
public static getJson ( ) : string
Результат string
    public static function getJson()
    {
        return '{"id":"TestSample","reference_id":"TestSample","amount":' . AmountTest::getJson() . ',"payment_mode":"TestSample","state":"TestSample","reason_code":"TestSample","pending_reason":"TestSample","protection_eligibility":"TestSample","protection_eligibility_type":"TestSample","parent_payment":"TestSample","fmf_details":' . FmfDetailsTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
    }

Usage Example

Пример #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);
 }
All Usage Examples Of PayPal\Test\Api\OrderTest::getJson