1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 05:37:49 +02:00

[3.1.0] Implement a few phpt, fix some autoload bugs

- Make our autoload handler polite, ensuring that any __autoload() 
functions get added
- Modify phpt calling code so that each phpt files gets its own 
test-case (this lets us run one phpt file at a time)
- Implement phpt for loading, which test varying loading methods of HTML 
Purifier
- Add --disable-phpt and --only-phpt flags
- More descriptive veto messages, also fix test count



git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1552 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-02-16 05:40:59 +00:00
parent 3441421e8b
commit 929d932234
10 changed files with 123 additions and 15 deletions

View File

@@ -4,6 +4,8 @@ if (!defined('HTMLPurifierTest')) exit;
// define callable test files (sorted alphabetically)
if (!$AC['only-phpt']) {
// HTML Purifier main library
$test_files[] = 'HTMLPurifier/AttrCollectionsTest.php';
@@ -141,6 +143,19 @@ $test_files[] = 'ConfigSchema/StringHashReverseAdapterTest.php';
$test_files[] = 'ConfigSchema/StringHashParserTest.php';
$test_files[] = 'ConfigSchema/StringHashTest.php';
} // end if ($AC['only-phpt'])
// PHPT tests
$test_files[] = 'HTMLPurifier/PHPT';
if (!$AC['disable-phpt']) {
$phpt_dirs = array();
$phpt_dirs[] = 'HTMLPurifier/PHPT';
foreach ($phpt_dirs as $dir) {
$FS = new FSTools();
$phpt_files = $FS->globr($dir, '*.phpt');
foreach ($phpt_files as $file) {
$test_files[] = str_replace('\\', '/', $file);
}
}
}