t('Australia Phone number test'), 'description' => t('Tests various valid and invalid Australia phone numbers for validity'), 'group' => t('Phone') ); } public function testPhoneAUValid() { $this->assertTrue(valid_phone_number('au', '0200-0299'), t('ACT')); $this->assertTrue(valid_phone_number('au', '2600-2639'), t('ACT')); $this->assertTrue(valid_phone_number('au', '1000-1999'), t('NSW')); $this->assertTrue(valid_phone_number('au', '2000-2599'), t('NSW')); $this->assertTrue(valid_phone_number('au', '2640-2914'), t('NSW')); $this->assertTrue(valid_phone_number('au', '0900-0999'), t('NT')); $this->assertTrue(valid_phone_number('au', '0800-0899'), t('NT')); $this->assertTrue(valid_phone_number('au', '9000-9999'), t('QLD')); $this->assertTrue(valid_phone_number('au', '4000-4999'), t('QLD')); $this->assertTrue(valid_phone_number('au', '5000-5999'), t('SA')); $this->assertTrue(valid_phone_number('au', '7800-7999'), t('TAS')); $this->assertTrue(valid_phone_number('au', '7000-7499'), t('TAS')); $this->assertTrue(valid_phone_number('au', '8000-8999'), t('VIC')); $this->assertTrue(valid_phone_number('au', '3000-3999'), t('VIC')); $this->assertTrue(valid_phone_number('au', '6800-6999'), t('WA')); $this->assertTrue(valid_phone_number('au', '6000-6799'), t('WA')); } public function testPhoneAUInvalid() { $this->assertFalse(valid_phone_number('au', '0300'), t('Test invalid')); $this->assertFalse(valid_phone_number('au', '7612'), t('Test invalid')); $this->assertFalse(valid_phone_number('au', '2915'), t('Test invalid')); $this->assertFalse(valid_phone_number('au', '2415b'), t('Test invalid')); } public function testPhoneAUFormatting() { //$this->assertEqual(format_phone_number('au', '+6421123456', null), '+64 21 123 456', t('Check international mobile format')); } }