1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +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

@@ -26,6 +26,12 @@ $AC['file'] = '';
$AC['xml'] = false;
$AC['dry'] = false;
$AC['php'] = 'php';
// Convenience parameters for running quicker tests; ideally all tests
// should be performed.
$AC['disable-phpt'] = false;
$AC['only-phpt'] = false;
$aliases = array(
'f' => 'file',
);
@@ -36,8 +42,15 @@ if (!SimpleReporter::inCli()) {
$AC['php'] = 'php';
}
$phpt = PHPT_Registry::getInstance();
$phpt->php = $AC['php'];
if ($AC['disable-phpt'] && $AC['only-phpt']) {
echo "Cannot disable and allow only PHPT tests!\n";
exit(1);
}
if (!$AC['disable-phpt']) {
$phpt = PHPT_Registry::getInstance();
$phpt->php = $AC['php'];
}
// clean out cache if necessary
if ($AC['flush']) shell_exec($AC['php'] . ' ../maintenance/flush-definition-cache.php');