You are here

function PathfilterTestCase::CompareSnippets in Path Filter 7

Same name and namespace in other branches
  1. 6.2 tests/pathfilter.test \PathfilterTestCase::CompareSnippets()
  2. 6 tests/pathfilter.test \PathfilterTestCase::CompareSnippets()
4 calls to PathfilterTestCase::CompareSnippets()
PathfilterTestCase::testFiles in tests/pathfilter.test
test_pathfilter
PathfilterTestCase::testFilesInvalidMatches in tests/pathfilter.test
test_pathfilter
PathfilterTestCase::testInternalAbsolute in tests/pathfilter.test
test_pathfilter
PathfilterTestCase::testInternalRelative in tests/pathfilter.test
test_pathfilter

File

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

Class

PathfilterTestCase

Code

function CompareSnippets($snippets) {
  foreach ($snippets as $before => $after) {
    $result = pathfilter_filter('process', 0, 1, $before);
    if ($after) {
      $this
        ->assertTrue($result == $after, 'Parsing: ' . $before . '<br/> Expected: ' . $after . '<br/> Got: ' . $result);
    }
    else {
      $this
        ->assertTrue($result == $before, 'Pathfilter should not parse: ' . $before . '<br/> Got: ' . $result);
    }
  }
}