You are here

function Braintree_CustomerTest::testUpdateFromTransparentRedirect in Commerce Braintree 7

File

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

Class

Braintree_CustomerTest

Code

function testUpdateFromTransparentRedirect() {
  Braintree_TestHelper::suppressDeprecationWarnings();
  $customer = Braintree_Customer::createNoValidate();
  $queryString = $this
    ->updateCustomerViaTr(array(
    'customer' => array(
      'first_name' => 'Joe',
      'last_name' => 'Martin',
      'email' => 'joe.martin@example.com',
    ),
  ), array(
    'customerId' => $customer->id,
  ));
  $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);
}