public function UKPhoneNumberTestCase::testPhoneUKValid in Phone 6
Same name and namespace in other branches
- 7 tests/phone.uk.test \UKPhoneNumberTestCase::testPhoneUKValid()
File
- tests/
phone-uk.test, line 16
Class
Code
public function testPhoneUKValid() {
$this
->assertTrue(valid_phone_number('uk', '01905 23819'), t('Test valid - 01905 23819'));
$this
->assertTrue(valid_phone_number('uk', '01222 555 555'), t('Test valid - 01222 555 555'));
$this
->assertTrue(valid_phone_number('uk', '(010) 55555555 #2222'), t('Test valid - (010) 55555555 #2222'));
$this
->assertTrue(valid_phone_number('uk', '0122 555 5555#222'), t('Test valid - 0122 555 5555#222'));
$this
->assertTrue(valid_phone_number('uk', '+441970123456'), t('Test valid - +441970123456'));
$this
->assertTrue(valid_phone_number('uk', '+44(0)1970123456'), t('Test valid - +44(0)1970123456'));
$this
->assertTrue(valid_phone_number('uk', '+44 1970 123 4562'), t('Test valid - +44 1970 123 456'));
$this
->assertTrue(valid_phone_number('uk', '+44 (0)1970 123 456'), t('Test valid - +44 (0)1970 123 456'));
$this
->assertTrue(valid_phone_number('uk', '(01970) 123456 #0001'), t('Test valid - (01970) 123456 #0001'));
}