function PathfilterTestCase::CompareSnippets in Path Filter 6
Same name and namespace in other branches
- 6.2 tests/pathfilter.test \PathfilterTestCase::CompareSnippets()
- 7 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 72 - Tests for Path Filter
Class
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/> But got: ' . $result);
}
else {
$this
->assertTrue($result == $before, 'Pathfilter should not parse: ' . $before . '<br/> But got: ' . $result);
}
}
}