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 PayerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Gets Json String of Object Payer
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"payment_method":"TestSample","status":"TestSample","account_type":"TestSample","account_age":"TestSample","funding_instruments":' . FundingInstrumentTest::getJson() . ',"funding_option_id":"TestSample","funding_option":' . FundingOptionTest::getJson() . ',"related_funding_option":' . FundingOptionTest::getJson() . ',"payer_info":' . PayerInfoTest::getJson() . '}';
|
||||
return '{"payment_method":"TestSample","status":"TestSample","account_type":"TestSample","account_age":"TestSample","funding_instruments":' .FundingInstrumentTest::getJson() . ',"funding_option_id":"TestSample","funding_option":' .FundingOptionTest::getJson() . ',"external_selected_funding_instrument_type":"TestSample","related_funding_option":' .FundingOptionTest::getJson() . ',"payer_info":' .PayerInfoTest::getJson() . '}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Object Instance with Json data filled in
|
||||
*
|
||||
* @return Payer
|
||||
*/
|
||||
public static function getObject()
|
||||
@@ -34,7 +32,6 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
*
|
||||
* @return Payer
|
||||
*/
|
||||
public function testSerializationDeserialization()
|
||||
@@ -48,6 +45,7 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($obj->getFundingInstruments());
|
||||
$this->assertNotNull($obj->getFundingOptionId());
|
||||
$this->assertNotNull($obj->getFundingOption());
|
||||
$this->assertNotNull($obj->getExternalSelectedFundingInstrumentType());
|
||||
$this->assertNotNull($obj->getRelatedFundingOption());
|
||||
$this->assertNotNull($obj->getPayerInfo());
|
||||
$this->assertEquals(self::getJson(), $obj->toJson());
|
||||
@@ -67,6 +65,7 @@ class PayerTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getFundingInstruments(), FundingInstrumentTest::getObject());
|
||||
$this->assertEquals($obj->getFundingOptionId(), "TestSample");
|
||||
$this->assertEquals($obj->getFundingOption(), FundingOptionTest::getObject());
|
||||
$this->assertEquals($obj->getExternalSelectedFundingInstrumentType(), "TestSample");
|
||||
$this->assertEquals($obj->getRelatedFundingOption(), FundingOptionTest::getObject());
|
||||
$this->assertEquals($obj->getPayerInfo(), PayerInfoTest::getObject());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user