View source
<?php
class CLPhoneNumberTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => t('Chili Phone number test'),
'description' => t('Tests various valid and invalid Chili phone numbers for validity'),
'group' => t('Phone'),
);
}
public function testPhoneCLValid() {
$this
->assertTrue(valid_phone_number('cl', '(041)245-9848'), t('Test valid'));
$this
->assertTrue(valid_phone_number('cl', '(063)421-232'), t('Test valid'));
}
public function testPhoneCLInvalid() {
$this
->assertFalse(valid_phone_number('cl', '0412459848'), t('Test invalid '));
$this
->assertFalse(valid_phone_number('cl', '063421232'), t('Test invalid '));
}
public function testPhoneCLFormatting() {
}
}