You are here

function Braintree_CreditCardTest::testCommercialCard in Commerce Braintree 7

File

braintree_php/tests/integration/CreditCardTest.php, line 954

Class

Braintree_CreditCardTest

Code

function testCommercialCard() {
  $customer = Braintree_Customer::createNoValidate();
  $result = Braintree_CreditCard::create(array(
    'customerId' => $customer->id,
    'cardholderName' => 'Cardholder',
    'number' => Braintree_CreditCardNumbers_CardTypeIndicators::COMMERCIAL,
    'expirationDate' => '05/12',
    'options' => array(
      'verifyCard' => true,
    ),
  ));
  $this
    ->assertEquals(Braintree_CreditCard::COMMERCIAL_YES, $result->creditCard->commercial);
}