diff --git a/tests/HTMLPurifier/LexerTest.php b/tests/HTMLPurifier/LexerTest.php index 332559dd..1e5c0409 100644 --- a/tests/HTMLPurifier/LexerTest.php +++ b/tests/HTMLPurifier/LexerTest.php @@ -7,7 +7,10 @@ class HTMLPurifier_LexerTest extends HTMLPurifier_Harness public function __construct() { parent::__construct(); - if ($GLOBALS['HTMLPurifierTest']['PEAR']) { + if ($GLOBALS['HTMLPurifierTest']['PEAR'] && + // PEARSax3 is not maintained and throws loads of DEPRECATED + // errors in PHP 5.3 + version_compare(PHP_VERSION, '5.3', '<')) { require_once 'HTMLPurifier/Lexer/PEARSax3.php'; $this->_has_pear = true; } diff --git a/tests/common.php b/tests/common.php index 01d6666c..aae5ea7e 100644 --- a/tests/common.php +++ b/tests/common.php @@ -48,7 +48,9 @@ require_once $simpletest_location . 'remote.php'; // load CSS Tidy if ($csstidy_location !== false) { + $old = error_reporting(E_ALL); require $csstidy_location . 'class.csstidy.php'; + error_reporting($old); } // load PEAR to include path