function Braintree_CustomerTest::testCreate_countryValidations_inconsistency in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ CustomerTest.php, line 304
Class
Code
function testCreate_countryValidations_inconsistency() {
$result = Braintree_Customer::create(array(
'creditCard' => array(
'billingAddress' => array(
'countryName' => 'Georgia',
'countryCodeAlpha2' => 'TF',
),
),
));
$this
->assertEquals(false, $result->success);
$errors = $result->errors
->forKey('customer')
->forKey('creditCard')
->forKey('billingAddress')
->onAttribute('base');
$this
->assertEquals(Braintree_Error_Codes::ADDRESS_INCONSISTENT_COUNTRY, $errors[0]->code);
}