PayPalModel to differentiate between empty objects and array

- Fixes to PayPalModel Conversion
- Fixes #262
This commit is contained in:
Jay Patel
2015-03-03 16:55:18 -06:00
parent 207c2c233e
commit fd6a38d0ef
5 changed files with 101 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ class PaymentExecutionTest extends \PHPUnit_Framework_TestCase
*/
public static function getJson()
{
return '{"payer_id":"TestSample","transactions":' .TransactionTest::getJson() . '}';
return '{"payer_id":"TestSample","transactions":[' .TransactionTest::getJson() . ']}';
}
/**
@@ -52,6 +52,6 @@ class PaymentExecutionTest extends \PHPUnit_Framework_TestCase
public function testGetters($obj)
{
$this->assertEquals($obj->getPayerId(), "TestSample");
$this->assertEquals($obj->getTransactions(), TransactionTest::getObject());
$this->assertEquals($obj->getTransactions(), array(TransactionTest::getObject()));
}
}