PayPal\Test\Api\WebProfileTest::getJson PHP 메소드

getJson() 공개 정적인 메소드

Gets Json String of Object WebProfile
public static getJson ( ) : string
리턴 string
    public static function getJson()
    {
        return '{"id":"TestSample","name":"TestSample","temporary":true,"flow_config":' . FlowConfigTest::getJson() . ',"input_fields":' . InputFieldsTest::getJson() . ',"presentation":' . PresentationTest::getJson() . '}';
    }

Usage Example

예제 #1
0
 /**
  * @dataProvider mockProvider
  * @param WebProfile $obj
  */
 public function testGetList($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(json_encode(array(json_decode(WebProfileTest::getJson())))));
     $result = $obj->get_list($mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }