You are here

function Braintree_Error_ErrorCollectionTest::testDeepSize_withNestedErrors in Commerce Braintree 7

File

braintree_php/tests/integration/Error/ErrorCollectionTest.php, line 6

Class

Braintree_Error_ErrorCollectionTest

Code

function testDeepSize_withNestedErrors() {
  $result = Braintree_Customer::create(array(
    'email' => 'invalid',
    'creditCard' => array(
      'number' => 'invalid',
      'expirationDate' => 'invalid',
      'billingAddress' => array(
        'countryName' => 'invaild',
      ),
    ),
  ));
  $this
    ->assertEquals(false, $result->success);
  $this
    ->assertEquals(4, $result->errors
    ->deepSize());
}