You are here

function Braintree_TransactionTest::testSale_underscoresAllCustomFields in Commerce Braintree 7

File

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

Class

Braintree_TransactionTest

Code

function testSale_underscoresAllCustomFields() {
  $result = Braintree_Transaction::sale(array(
    'amount' => '100.00',
    'creditCard' => array(
      'number' => '5105105105105100',
      'expirationDate' => '05/12',
    ),
    'customFields' => array(
      'storeMe' => 'custom value',
    ),
  ));
  $this
    ->assertTrue($result->success);
  $transaction = $result->transaction;
  $customFields = $transaction->customFields;
  $this
    ->assertEquals('custom value', $customFields['store_me']);
}