function LinkValidateUrlLight::testInvalidExternalLinks in Link 6.2
File
- tests/
link.validate.test, line 488 - 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 testInvalidExternalLinks() {
$links = array(
'http://www.ex ample.com/',
'//www.example.com/',
'http://25.0.0/',
// bad ip!
'http://4827.0.0.2/',
'http://www.testß.com/',
);
foreach ($links as $link) {
$valid = link_validate_url($link);
$this
->assertEqual(FALSE, $valid, 'Testing that ' . $link . ' is not a valid link.');
}
}