forked from LiveCarta/PayPal-PHP-SDK
Payments API Updates
This commit is contained in:
@@ -13,15 +13,17 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Gets Json String of Object InstallmentOption
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getJson()
|
||||
{
|
||||
return '{"term":123,"monthly_payment":' .CurrencyTest::getJson() . ',"discount_amount":' .CurrencyTest::getJson() . ',"discount_percentage":"12.34"}';
|
||||
return '{"term":123,"monthly_payment":' . CurrencyTest::getJson() . ',"discount_amount":' . CurrencyTest::getJson() . ',"discount_percentage":"TestSample"}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Object Instance with Json data filled in
|
||||
*
|
||||
* @return InstallmentOption
|
||||
*/
|
||||
public static function getObject()
|
||||
@@ -32,6 +34,7 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Tests for Serialization and Deserialization Issues
|
||||
*
|
||||
* @return InstallmentOption
|
||||
*/
|
||||
public function testSerializationDeserialization()
|
||||
@@ -55,6 +58,8 @@ class InstallmentOptionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($obj->getTerm(), 123);
|
||||
$this->assertEquals($obj->getMonthlyPayment(), CurrencyTest::getObject());
|
||||
$this->assertEquals($obj->getDiscountAmount(), CurrencyTest::getObject());
|
||||
$this->assertEquals($obj->getDiscountPercentage(), "12.34");
|
||||
$this->assertEquals($obj->getDiscountPercentage(), "TestSample");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user