1.20.x link.validate.test LinkValidateUnitTest::testValidateNewsArticleLink()

File

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

Class

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

Code

function testValidateNewsArticleLink() {
  $valid = link_validate_url('news:hj0db8$vrm$1@news.eternal-september.org');
  $this->assertEqual(LINK_NEWS, $valid, 'Make sure link to specific article valiates as news.');
}