You are here

function Braintree_CustomerTest::testCreate_withUnicode in Commerce Braintree 7

File

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

Class

Braintree_CustomerTest

Code

function testCreate_withUnicode() {
  $result = Braintree_Customer::create(array(
    'firstName' => "Здравствуйте",
    'lastName' => 'Jones',
    'company' => 'Jones Co.',
    'email' => 'mike.jones@example.com',
    'phone' => '419.555.1234',
    'fax' => '419.555.1235',
    'website' => 'http://example.com',
  ));
  $this
    ->assertEquals(true, $result->success);
  $customer = $result->customer;
  $this
    ->assertEquals("Здравствуйте", $customer->firstName);
  $this
    ->assertEquals('Jones', $customer->lastName);
  $this
    ->assertEquals('Jones Co.', $customer->company);
  $this
    ->assertEquals('mike.jones@example.com', $customer->email);
  $this
    ->assertEquals('419.555.1234', $customer->phone);
  $this
    ->assertEquals('419.555.1235', $customer->fax);
  $this
    ->assertEquals('http://example.com', $customer->website);
  $this
    ->assertNotNull($customer->merchantId);
}