0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

Implement user-friendly links to test-cases on web tester.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang 2008-12-20 12:44:22 -05:00
parent 3dfcd016d3
commit 119ebcda71

View File

@ -45,6 +45,16 @@ class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
return $css;
}
function getTestList() {
// hacky; depends on a specific implementation of paintPass, etc.
$list = parent::getTestList();
$testcase = $list[1];
if (class_exists($testcase, false)) $file = str_replace('_', '/', $testcase) . '.php';
else $file = $testcase;
$list[1] = '<a href="index.php?file=' . $file . '">' . $testcase . '</a>';
return $list;
}
}
// vim: et sw=4 sts=4