You are here

public function CAPhoneNumberTestCase::testPhoneCAValid in Phone 7

Same name and namespace in other branches
  1. 6 tests/phone-ca.test \CAPhoneNumberTestCase::testPhoneCAValid()

File

tests/phone.ca.test, line 16

Class

CAPhoneNumberTestCase

Code

public function testPhoneCAValid() {
  $this
    ->assertTrue(valid_phone_number('ca', '1-800-555-1212'), t('Test valid - 1-800-555-1212'));
  $this
    ->assertTrue(valid_phone_number('ca', '800-555-1212'), t('Test valid - 800-555-1212'));
  $this
    ->assertTrue(valid_phone_number('ca', '(201)223-4567'), t('Test valid - (201)223-4567'));
  $this
    ->assertTrue(valid_phone_number('ca', '604 543 9245'), t('Test valid - British Columbia 604 543 9245'));
}