mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Implement HTMLT tests, and migrate HTMLPurifierTest to this format.
HTMLT tests are a compact and easy-to-use way of making assertPurification type tests. They take the format of: --INI-- Ns.Directive = "directive value" --HTML-- Input HTML --EXPECT-- Expected HTML Expect more features and migration to be coming soon. Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -161,6 +161,8 @@ function htmlpurifier_add_test($test, $test_file, $only_phpt = false) {
|
||||
return $test->add(path2class($test_file));
|
||||
case '.vtest':
|
||||
return $test->add(new HTMLPurifier_ConfigSchema_ValidatorTestCase($test_file));
|
||||
case '.htmlt':
|
||||
return $test->add(new HTMLPurifier_HTMLT($test_file));
|
||||
default:
|
||||
trigger_error("$test_file is an invalid file for testing", E_USER_ERROR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user