From c1cbd9e5654bbdd6588f36d445392379c6311e0b Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 26 Apr 2010 18:27:32 -0400 Subject: [PATCH] Mute STRICT errors from CSSTidy and don't run PEARSax3 on PHP 5.3. Signed-off-by: Edward Z. Yang --- tests/HTMLPurifier/LexerTest.php | 5 ++++- tests/common.php | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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