123456789101112131415161718192021222324252627 |
- <?php
- class ILPhoneNumberTestCase extends DrupalWebTestCase {
- /**
- * Implementation of getInfo()
- *
- */
- public static function getInfo() {
- return array(
- 'name' => t('Israel Phone number test'),
- 'description' => t('Tests various valid and invalid Israel phone numbers for validity'),
- 'group' => t('Phone')
- );
- }
- public function testPhoneILValid() {
- $this->assertTrue(valid_phone_number('il', '1800 999 999'), '"1800 999 999" should be valid');
- }
- public function testPhoneILInvalid() {
- //$this->assertFalse(valid_phone_number('il', '021 3012 3456'), t('Test invalid'));
- }
- public function testPhoneILFormatting() {
- $this->assertEqual(format_phone_number('il', '1800 999 999', null), '1800 999 999', 'Formatting OK "1800 999 999" --> "1800 999 999"');
- }
- }
|