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

getJson() 공개 정적인 메소드

Gets Json String of Object PlanList
public static getJson ( ) : string
리턴 string
    public static function getJson()
    {
        return '{"plans":' . PlanTest::getJson() . ',"total_items":"TestSample","total_pages":"TestSample","links":' . LinksTest::getJson() . '}';
    }

Usage Example

예제 #1
0
파일: PlanTest.php 프로젝트: Roc4rdho/app
 /**
  * @dataProvider mockProvider
  * @param Plan $obj
  */
 public function testList($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(PlanListTest::getJson()));
     $params = ParamsTest::getObject();
     $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }