1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-11 08:34:29 +02:00

- Added Composite and Core strategies.

- Added generate_mock() function for testing
- Factored out inputs/output tests to StrategyAbstractTest

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@124 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-07-29 17:38:28 +00:00
parent 39836fe278
commit 9b7ad89ab5
9 changed files with 171 additions and 23 deletions

View File

@@ -11,6 +11,14 @@ require_once 'Debugger.php';
// emulates inserting a dir called HTMLPurifier into your class dir
set_include_path(get_include_path() . PATH_SEPARATOR . '../library');
// since Mocks can't be called from within test files, we need to do
// a little jumping through hoops to generate them
function generate_mock_once($name) {
$mock_name = $name . 'Mock';
if (class_exists($mock_name)) return false;
Mock::generate($name, $mock_name);
}
$test = new GroupTest('HTMLPurifier');
$test->addTestFile('HTMLPurifier/LexerTest.php');
@@ -22,6 +30,8 @@ $test->addTestFile('HTMLPurifier/EntityLookupTest.php');
$test->addTestFile('HTMLPurifier/Strategy/RemoveForeignElementsTest.php');
$test->addTestFile('HTMLPurifier/Strategy/MakeWellFormedTest.php');
$test->addTestFile('HTMLPurifier/Strategy/FixNestingTest.php');
$test->addTestFile('HTMLPurifier/Strategy/CompositeTest.php');
$test->addTestFile('HTMLPurifier/Strategy/CoreTest.php');
$test->run( new HtmlReporter() );