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

getJson() public static method

Gets Json String of Object Templates
public static getJson ( ) : string
return string
    public static function getJson()
    {
        return '{"addresses":' . AddressTest::getJson() . ',"emails":"TestSample","phones":' . PhoneTest::getJson() . ',"templates":' . TemplateTest::getJson() . ',"links":' . LinksTest::getJson() . '}';
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @dataProvider mockProvider
  * @param Templates $obj
  */
 public function testGetAll($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(TemplatesTest::getJson()));
     $params = array();
     $result = $obj->getAll($params, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }