t('Spain Phone number test'), 'description' => t('Tests various valid and invalid Spain phone numbers for validity'), 'group' => t('Phone') ); } public function testPhoneESValid() { $this->assertTrue(valid_phone_number('es', '972367087'), t('Test valid')); $this->assertTrue(valid_phone_number('es', '97-3770866'), t('Test valid')); $this->assertTrue(valid_phone_number('es', '972-377086'), t('Test valid')); } public function testPhoneESInvalid() { $this->assertFalse(valid_phone_number('es', '9988-989898'), t('Test invalid')); $this->assertFalse(valid_phone_number('es', '989898988989'), t('Test invalid')); $this->assertFalse(valid_phone_number('es', '9 9898989898'), t('Test invalid')); } public function testPhoneESFormatting() { //$this->assertEqual(format_phone_number('es', '+6421123456', null), '+64 21 123 456', t('Check international mobile format')); } }