You are here

function Braintree_TransactionTest::testSale_withExpirationMonthAndYear in Commerce Braintree 7

File

braintree_php/tests/integration/TransactionTest.php, line 327

Class

Braintree_TransactionTest

Code

function testSale_withExpirationMonthAndYear() {
  $result = Braintree_Transaction::sale(array(
    'amount' => '100.00',
    'creditCard' => array(
      'number' => '5105105105105100',
      'expirationMonth' => '5',
      'expirationYear' => '2012',
    ),
  ));
  $this
    ->assertTrue($result->success);
  $transaction = $result->transaction;
  $this
    ->assertEquals('05', $transaction->creditCardDetails->expirationMonth);
  $this
    ->assertEquals('2012', $transaction->creditCardDetails->expirationYear);
}