You are here

function Braintree_CreditCardTest::testCreateSignature in Commerce Braintree 7

File

braintree_php/tests/unit/CreditCardTest.php, line 34

Class

Braintree_CreditCardTest

Code

function testCreateSignature() {
  $expected = array(
    'billingAddressId',
    'cardholderName',
    'cvv',
    'number',
    'expirationDate',
    'expirationMonth',
    'expirationYear',
    'token',
    array(
      'options' => array(
        'makeDefault',
        'verificationMerchantAccountId',
        'verifyCard',
        'failOnDuplicatePaymentMethod',
      ),
    ),
    array(
      'billingAddress' => array(
        'firstName',
        'lastName',
        'company',
        'countryCodeAlpha2',
        'countryCodeAlpha3',
        'countryCodeNumeric',
        'countryName',
        'extendedAddress',
        'locality',
        'region',
        'postalCode',
        'streetAddress',
      ),
    ),
    'customerId',
  );
  $this
    ->assertEquals($expected, Braintree_CreditCard::CreateSignature());
}