You are here

function PathfilterTestCase::testInternalAbsolute in Path Filter 7

Same name and namespace in other branches
  1. 6.2 tests/pathfilter.test \PathfilterTestCase::testInternalAbsolute()
  2. 6 tests/pathfilter.test \PathfilterTestCase::testInternalAbsolute()

test_pathfilter

TODO: Write a description of the tests!

1 call to PathfilterTestCase::testInternalAbsolute()
PathfilterTestCase::testNoCleanURLs in tests/pathfilter.test
test with clean URL's disabled

File

tests/pathfilter.test, line 86
Tests for Path Filter

Class

PathfilterTestCase

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"' => '"' . url($base_url . '/admin/user') . '"',
    '\'internal:admin/user\'' => '\'' . url($base_url . '/admin/user') . '\'',
    // single quotes
    '"internal:node/nid"' => '"' . url($base_url . '/node/nid') . '"',
    '"internal:node/' . $node->nid . '"' => '"' . url($base_url . '/node/' . $node->nid) . '"',
    '"internal:node/nid?page=1#section2"' => '"' . url($base_url . '/node/nid', array(
      'query' => 'page=1',
      'fragment' => 'section2',
    )) . '"',
  );
  $this
    ->CompareSnippets($snippets);
}