forked from LiveCarta/PayPal-PHP-SDK
Payments API Updates
This commit is contained in:
@@ -13,15 +13,17 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Gets Json String of Object PayerInfo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"email":"TestSample","external_remember_me_id":"TestSample","buyer_account_number":"TestSample","salutation":"TestSample","first_name":"TestSample","middle_name":"TestSample","last_name":"TestSample","suffix":"TestSample","payer_id":"TestSample","phone":"TestSample","phone_type":"TestSample","birth_date":"TestSample","tax_id":"TestSample","tax_id_type":"TestSample","country_code":"TestSample","billing_address":' .AddressTest::getJson() . ',"shipping_address":' .ShippingAddressTest::getJson() . '}';
|
||||
return '{"email":"TestSample","external_remember_me_id":"TestSample","account_number":"TestSample","salutation":"TestSample","first_name":"TestSample","middle_name":"TestSample","last_name":"TestSample","suffix":"TestSample","payer_id":"TestSample","phone":"TestSample","phone_type":"TestSample","birth_date":"TestSample","tax_id":"TestSample","tax_id_type":"TestSample","country_code":"TestSample","billing_address":' . AddressTest::getJson() . ',"shipping_address":' . ShippingAddressTest::getJson() . '}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Object Instance with Json data filled in
|
||||
*
|
||||
* @return PayerInfo
|
||||
*/
|
||||
public static function getObject()
|
||||
@@ -32,6 +34,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
*
|
||||
* @return PayerInfo
|
||||
*/
|
||||
public function testSerializationDeserialization()
|
||||
@@ -40,7 +43,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertNotNull($obj);
|
||||
$this->assertNotNull($obj->getEmail());
|
||||
$this->assertNotNull($obj->getExternalRememberMeId());
|
||||
$this->assertNotNull($obj->getBuyerAccountNumber());
|
||||
$this->assertNotNull($obj->getAccountNumber());
|
||||
$this->assertNotNull($obj->getSalutation());
|
||||
$this->assertNotNull($obj->getFirstName());
|
||||
$this->assertNotNull($obj->getMiddleName());
|
||||
@@ -67,7 +70,7 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals($obj->getEmail(), "TestSample");
|
||||
$this->assertEquals($obj->getExternalRememberMeId(), "TestSample");
|
||||
$this->assertEquals($obj->getBuyerAccountNumber(), "TestSample");
|
||||
$this->assertEquals($obj->getAccountNumber(), "TestSample");
|
||||
$this->assertEquals($obj->getSalutation(), "TestSample");
|
||||
$this->assertEquals($obj->getFirstName(), "TestSample");
|
||||
$this->assertEquals($obj->getMiddleName(), "TestSample");
|
||||
@@ -84,4 +87,5 @@ class PayerInfoTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getShippingAddress(), ShippingAddressTest::getObject());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user