forked from LiveCarta/PayPal-PHP-SDK
Fixed testcases
This commit is contained in:
@@ -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()));
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user