Tests invalid relative URLs.
function testInvalidRelative() {
$invalid_relative_urls = array(
'ex^mple',
'example<>',
'ex%ample',
);
foreach (array(
'',
'/',
) as $front) {
foreach ($invalid_relative_urls as $url) {
$test_url = $front . $url;
$valid_url = valid_url($test_url);
$this
->assertFALSE($valid_url, format_string('@url is NOT a valid URL.', array(
'@url' => $test_url,
)));
}
}
}