You are here

public function BRPhoneNumberTestCase::testPhoneBRValid in Phone 7

Same name and namespace in other branches
  1. 6 tests/phone-br.test \BRPhoneNumberTestCase::testPhoneBRValid()

File

tests/phone.br.test, line 16

Class

BRPhoneNumberTestCase

Code

public function testPhoneBRValid() {
  $this
    ->assertTrue(valid_phone_number('br', '(11) 1234-5678'), t('Test valid - (11) 1234-5678'));
  $this
    ->assertTrue(valid_phone_number('br', '1234-5678 '), t('Test valid - 1234-5678'));
  $this
    ->assertTrue(valid_phone_number('br', '12345678'), t('Test valid - 12345678'));
  $this
    ->assertTrue(valid_phone_number('br', '+55 11 2222-3333'), t('Test valid - +55 11 2222-3333'));
  $this
    ->assertTrue(valid_phone_number('br', '011 5555-1234'), t('Test valid - 011 5555-1234'));
  $this
    ->assertTrue(valid_phone_number('br', '(011) 5555 1234'), t('Test valid - (011) 5555 1234'));
  $this
    ->assertTrue(valid_phone_number('br', '(11) 5555.1234'), t('Test valid - (11) 5555.1234'));
  $this
    ->assertTrue(valid_phone_number('br', '1155551234'), t('Test valid - 1155551234'));
}