2006-07-23 00:11:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
require_once 'simpletest/unit_tester.php';
|
|
|
|
require_once 'simpletest/reporter.php';
|
|
|
|
require_once 'simpletest/mock_objects.php';
|
|
|
|
|
|
|
|
require_once 'Debugger.php';
|
|
|
|
|
|
|
|
// emulates inserting a dir called HTMLPurifier into your class dir
|
|
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . '../library');
|
|
|
|
|
2006-07-29 17:38:28 +00:00
|
|
|
// 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);
|
|
|
|
}
|
|
|
|
|
2006-07-23 00:11:03 +00:00
|
|
|
$test = new GroupTest('HTMLPurifier');
|
|
|
|
|
|
|
|
$test->addTestFile('HTMLPurifier/LexerTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/Lexer/DirectLexTest.php');
|
|
|
|
//$test->addTestFile('TokenTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/ChildDefTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/GeneratorTest.php');
|
2006-07-23 21:07:30 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/EntityLookupTest.php');
|
2006-07-24 02:49:37 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/RemoveForeignElementsTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/MakeWellFormedTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/FixNestingTest.php');
|
2006-07-29 17:38:28 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/CompositeTest.php');
|
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/CoreTest.php');
|
2006-07-30 18:37:42 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/Strategy/ValidateAttributesTest.php');
|
2006-07-30 00:54:38 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/AttrDef/EnumTest.php');
|
2006-07-30 16:35:05 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/AttrDef/IDTest.php');
|
2006-07-30 15:52:25 +00:00
|
|
|
$test->addTestFile('HTMLPurifier/IDAccumulatorTest.php');
|
2006-07-23 00:11:03 +00:00
|
|
|
|
|
|
|
$test->run( new HtmlReporter() );
|
|
|
|
|
2006-07-21 23:27:00 +00:00
|
|
|
?>
|