function Braintree_CustomerTest::testCreate in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ CustomerTest.php, line 25
Class
Code
function testCreate() {
$result = Braintree_Customer::create(array(
'firstName' => 'Mike',
'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('Mike', $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);
}