forked from LiveCarta/PayPal-PHP-SDK
testcases updated
updated testcases to match new json schema and updates with camel case function names
This commit is contained in:
@@ -10,19 +10,17 @@ class RefundTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
public static $captureId = "CAP-123";
|
||||
public static $createTime = "2013-02-28T00:00:00Z";
|
||||
public static $description = "Test refund";
|
||||
public static $id = "R-5678";
|
||||
public static $parentPayment = "PAY-123";
|
||||
|
||||
public static function createRefund() {
|
||||
$refund = new Refund();
|
||||
$refund->setCreateTime(self::$createTime);
|
||||
$refund->setAmount(AmountTest::createAmount());
|
||||
$refund->setCapture_id(self::$captureId);
|
||||
$refund->setCreate_time(self::$createTime);
|
||||
$refund->setDescription(self::$description);
|
||||
$refund->setCaptureId(self::$captureId);
|
||||
$refund->setId(self::$id);
|
||||
$refund->setLinks(array(LinkTest::createLink()));
|
||||
$refund->setParent_payment(self::$parentPayment);
|
||||
$refund->setLinks(array(LinksTest::createLinks()));
|
||||
$refund->setParentPayment(self::$parentPayment);
|
||||
|
||||
return $refund;
|
||||
}
|
||||
@@ -32,14 +30,13 @@ class RefundTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
public function testGetterSetter() {
|
||||
$this->assertEquals(self::$captureId, $this->refund->getCapture_id());
|
||||
$this->assertEquals(self::$createTime, $this->refund->getCreate_time());
|
||||
$this->assertEquals(self::$description, $this->refund->getDescription());
|
||||
$this->assertEquals(self::$captureId, $this->refund->getCaptureId());
|
||||
$this->assertEquals(self::$createTime, $this->refund->getCreateTime());
|
||||
$this->assertEquals(self::$id, $this->refund->getId());
|
||||
$this->assertEquals(self::$parentPayment, $this->refund->getParent_payment());
|
||||
$this->assertEquals(self::$parentPayment, $this->refund->getParentPayment());
|
||||
$this->assertEquals(AmountTest::$currency, $this->refund->getAmount()->getCurrency());
|
||||
$links = $this->refund->getLinks();
|
||||
$this->assertEquals(LinkTest::$href, $links[0]->getHref());
|
||||
$this->assertEquals(LinksTest::$href, $links[0]->getHref());
|
||||
}
|
||||
|
||||
public function testSerializeDeserialize() {
|
||||
|
||||
Reference in New Issue
Block a user