Enabled Billing Plans and Agreements APIs

- Added API Classes, Samples, and Tests
- Updated Functional Tests
- Updated Documentation with new SDK Name
- Updated Few Samples to use newer nicer result page
This commit is contained in:
japatel
2014-10-31 10:16:13 -05:00
parent f55fd3d984
commit 4d481ad104
192 changed files with 13310 additions and 1045 deletions

View File

@@ -0,0 +1,77 @@
<?php
namespace PayPal\Test\Api;
use PayPal\Common\PPModel;
use PayPal\Api\PatchRequest;
/**
* Class PatchRequest
*
* @package PayPal\Test\Api
*/
class PatchRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Gets Json String of Object PatchRequest
* @return string
*/
public static function getJson()
{
return '{"patches":' .PatchTest::getJson() . '}';
}
/**
* Gets Object Instance with Json data filled in
* @return PatchRequest
*/
public static function getObject()
{
return new PatchRequest(self::getJson());
}
/**
* Tests for Serialization and Deserialization Issues
* @return PatchRequest
*/
public function testSerializationDeserialization()
{
$obj = new PatchRequest(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getPatches());
return $obj;
}
/**
* @depends testSerializationDeserialization
* @param PatchRequest $obj
*/
public function testGetters($obj)
{
$this->assertEquals($obj->getPatches(), PatchTest::getObject());
}
/**
* @depends testSerializationDeserialization
* @param PatchRequest $obj
*/
public function testDeprecatedGetters($obj)
{
}
/**
* @depends testSerializationDeserialization
* @param PatchRequest $obj
*/
public function testDeprecatedSetterNormalGetter($obj)
{
//Test All Deprecated Getters and Normal Getters
$this->testDeprecatedGetters($obj);
$this->testGetters($obj);
}
}