PayPal\Test\Api\CreditCardListTest::getJson PHP Method

getJson() public static method

Gets Json String of Object CreditCardList
public static getJson ( ) : string
return string
    public static function getJson()
    {
        return '{"items":' . CreditCardTest::getJson() . ',"links":' . LinksTest::getJson() . ',"total_items":123,"total_pages":123}';
    }

Usage Example

 /**
  * @dataProvider mockProvider
  * @param CreditCard $obj
  */
 public function testList($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(CreditCardListTest::getJson()));
     $params = array();
     $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }