mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-02 20:27:40 +02: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:
@@ -45,6 +45,16 @@ class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
|
|||||||
return $css;
|
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
|
// vim: et sw=4 sts=4
|
||||||
|
Reference in New Issue
Block a user