function PathfilterTestCase::testInternalAbsolute in Path Filter 6
Same name and namespace in other branches
- 6.2 tests/pathfilter.test \PathfilterTestCase::testInternalAbsolute()
- 7 tests/pathfilter.test \PathfilterTestCase::testInternalAbsolute()
test_pathfilter
TODO: Write a description of the tests!
File
- tests/
pathfilter.test, line 108 - Tests for Path Filter
Class
Code
function testInternalAbsolute() {
global $base_url;
variable_set('pathfilter_link_absolute_1', 1);
// Create node for testing.
$node = $this
->drupalCreateNode();
$snippets = array(
'"internal:admin/user"' => '"' . $base_url . '/admin/user"',
'\'internal:admin/user\'' => '\'' . $base_url . '/admin/user\'',
// single quotes
'"internal:node/nid"' => '"' . $base_url . '/node/nid"',
'"internal:node/' . $node->nid . '"' => '"' . $base_url . '/' . drupal_get_path_alias('node/' . $node->nid) . '"',
'"internal:node/nid?page=1#section2"' => '"' . $base_url . '/node/nid?page=1#section2"',
);
$this
->CompareSnippets($snippets);
}