forked from LiveCarta/PayPal-PHP-SDK
Update payments API to v1.9
This commit is contained in:
committed by
jaypatel512 and sdcoffey
parent
7c5ea8b997
commit
c2947ff409
@@ -13,17 +13,15 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Gets Json String of Object FundingSource
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"funding_mode":"TestSample","funding_instrument_type":"TestSample","soft_descriptor":"TestSample","amount":' . CurrencyTest::getJson() . ',"legal_text":"TestSample","funding_detail":' . FundingDetailTest::getJson() . ',"additional_text":"TestSample","extends":' . FundingInstrumentTest::getJson() . ',"links":' . LinksTest::getJson() . '}';
|
||||
return '{"funding_mode":"TestSample","funding_instrument_type":"TestSample","soft_descriptor":"TestSample","amount":' .CurrencyTest::getJson() . ',"negative_balance_amount":' .CurrencyTest::getJson() . ',"legal_text":"TestSample","terms":"TestSample","funding_detail":' .FundingDetailTest::getJson() . ',"additional_text":"TestSample","links":' .LinksTest::getJson() . '}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Object Instance with Json data filled in
|
||||
*
|
||||
* @return FundingSource
|
||||
*/
|
||||
public static function getObject()
|
||||
@@ -34,7 +32,6 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
*
|
||||
* @return FundingSource
|
||||
*/
|
||||
public function testSerializationDeserialization()
|
||||
@@ -45,10 +42,10 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($obj->getFundingInstrumentType());
|
||||
$this->assertNotNull($obj->getSoftDescriptor());
|
||||
$this->assertNotNull($obj->getAmount());
|
||||
$this->assertNotNull($obj->getNegativeBalanceAmount());
|
||||
$this->assertNotNull($obj->getLegalText());
|
||||
$this->assertNotNull($obj->getFundingDetail());
|
||||
$this->assertNotNull($obj->getAdditionalText());
|
||||
$this->assertNotNull($obj->getExtends());
|
||||
$this->assertNotNull($obj->getLinks());
|
||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||
return $obj;
|
||||
@@ -64,10 +61,10 @@ class FundingSourceTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getFundingInstrumentType(), "TestSample");
|
||||
$this->assertEquals($obj->getSoftDescriptor(), "TestSample");
|
||||
$this->assertEquals($obj->getAmount(), CurrencyTest::getObject());
|
||||
$this->assertEquals($obj->getNegativeBalanceAmount(), CurrencyTest::getObject());
|
||||
$this->assertEquals($obj->getLegalText(), "TestSample");
|
||||
$this->assertEquals($obj->getFundingDetail(), FundingDetailTest::getObject());
|
||||
$this->assertEquals($obj->getAdditionalText(), "TestSample");
|
||||
$this->assertEquals($obj->getExtends(), FundingInstrumentTest::getObject());
|
||||
$this->assertEquals($obj->getLinks(), LinksTest::getObject());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user