This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/tests/PayPal/Test/Api/PaymentHistoryTest.php
Ganesh Hegde 50b09bdbde testcases updated
updated testcases to match new json schema
and updates with camel case function names
2013-05-28 10:08:34 +05:30

39 lines
947 B
PHP

<?php
namespace PayPal\Test\Api;
use PayPal\Api\PaymentHistory;
use PayPal\Test\Constants;
class PaymentHistoryTest extends \PHPUnit_Framework_TestCase {
private $history;
public static $count = "10";
public static $nextId = "11";
public static function createPaymentHistory() {
$history = new PaymentHistory();
$history->setCount(self::$count);
$history->setNextId(self::$nextId);
$history->setPayments(array(PaymentTest::createPayment()));
return $history;
}
public function setup() {
$this->history = PaymentHistoryTest::createPaymentHistory();
}
public function testGetterSetters() {
$this->assertEquals(self::$count, $this->history->getCount());
$this->assertEquals(self::$nextId, $this->history->getNextId());
}
public function testSerializeDeserialize() {
$history = new PaymentHistory();
$history->fromJson($this->history->toJSON());
$this->assertEquals($history, $this->history);
}
}