1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

Make PHPT globally configurable via test-settings.php

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1567 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-02-18 03:48:07 +00:00
parent ed2aa44bd2
commit f5a77c523b
4 changed files with 22 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ if (function_exists('spl_autoload_register')) {
// default settings (protect against register_globals)
$GLOBALS['HTMLPurifierTest'] = array();
$GLOBALS['HTMLPurifierTest']['PEAR'] = false; // do PEAR tests
$GLOBALS['HTMLPurifierTest']['PHPT'] = true; // do PHPT tests
$GLOBALS['HTMLPurifierTest']['PH5P'] = class_exists('DOMDocument');
// default library settings

View File

@@ -40,6 +40,9 @@ $aliases = array(
// with a function, but could be if we put this in a class.
htmlpurifier_parse_args($AC, $aliases);
// Disable PHPT tests if they're not enabled
if (!$GLOBALS['HTMLPurifierTest']['PHPT']) $AC['disable-phpt'] = true;
if (!SimpleReporter::inCli()) {
// Undo any dangerous parameters
$AC['php'] = $php;