Fixed testcases

This commit is contained in:
siddick
2014-03-28 22:41:48 +05:30
parent 699d6b86f1
commit 5963119d99
3 changed files with 49 additions and 50 deletions

View File

@@ -29,9 +29,6 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase {
$card->setCvv2(self::$cvv);
$card->setFirstName(self::$firstName);
$card->setLastName(self::$lastName);
$card->setId(self::$id);
$card->setValidUntil(self::$validUntil);
$card->setState(self::$state);
$card->setPayerId(self::$payerId);
return $card;
}
@@ -56,9 +53,6 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(self::$cvv, $c->getCvv2());
$this->assertEquals(self::$firstName, $c->getFirstName());
$this->assertEquals(self::$lastName, $c->getLastName());
$this->assertEquals(self::$id, $c->getId());
$this->assertEquals(self::$validUntil, $c->getValidUntil());
$this->assertEquals(self::$state, $c->getState());
$this->assertEquals(self::$payerId, $c->getPayerId());
$c = $this->cards['full'];
@@ -84,6 +78,7 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase {
$c1->create();
$this->assertNotNull($c1->getId());
$c2 = CreditCard::get($c1->getId());
$this->assertEquals($c1->getBillingAddress(), $c2->getBillingAddress());
$this->assertGreaterThan(0, count($c2->getLinks()));

View File

@@ -30,9 +30,13 @@ class PaymentTest extends \PHPUnit_Framework_TestCase {
}
public static function createNewPayment() {
$funding = FundingInstrumentTest::createFundingInstrument();
$funding->credit_card_token = null;
$payer = new Payer();
$payer->setPaymentMethod("credit_card");
$payer->setFundingInstruments(array(FundingInstrumentTest::createFundingInstrument()));
$payer->setFundingInstruments(array($funding));
$transaction = new Transaction();
$transaction->setAmount(AmountTest::createAmount());