You are here

function LinkValidateUrlLight::name_Link_Type in Link 6.2

Translates the LINK type constants to english for display and debugging of tests

File

tests/link.validate.test, line 385
Tests that exercise the validation functions in the link module.

Class

LinkValidateUrlLight
A series of tests of links, only going against the link_validate_url function in link.module.

Code

function name_Link_Type($type) {
  switch ($type) {
    case LINK_FRONT:
      return "Front";
    case LINK_EMAIL:
      return "Email";
    case LINK_NEWS:
      return "Newsgroup";
    case LINK_INTERNAL:
      return "Internal Link";
    case LINK_EXTERNAL:
      return "External Link";
    case FALSE:
      return "Invalid Link";
    default:
      return "Bad Value:" . $type;
  }
}