You are here

function Braintree_CustomerTest::testUpdateFromTransparentRedirect_withParamsInTrData in Commerce Braintree 7

File

braintree_php/tests/integration/CustomerTest.php, line 713

Class

Braintree_CustomerTest

Code

function testUpdateFromTransparentRedirect_withParamsInTrData() {
  Braintree_TestHelper::suppressDeprecationWarnings();
  $customer = Braintree_Customer::createNoValidate();
  $queryString = $this
    ->updateCustomerViaTr(array(), array(
    'customerId' => $customer->id,
    'customer' => array(
      'firstName' => 'Joe',
      'lastName' => 'Martin',
      'email' => 'joe.martin@example.com',
    ),
  ));
  $result = Braintree_Customer::updateFromTransparentRedirect($queryString);
  $this
    ->assertTrue($result->success);
  $this
    ->assertEquals('Joe', $result->customer->firstName);
  $this
    ->assertEquals('Martin', $result->customer->lastName);
  $this
    ->assertEquals('joe.martin@example.com', $result->customer->email);
}