From e802065b653b46b9abf912f06b8bf098576976d4 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 16 Feb 2009 02:59:48 -0500 Subject: [PATCH] Punt Lexer test entirely for 5.0.5. Signed-off-by: Edward Z. Yang --- tests/HTMLPurifier/LexerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/HTMLPurifier/LexerTest.php b/tests/HTMLPurifier/LexerTest.php index 3d9c0309..18c2a787 100644 --- a/tests/HTMLPurifier/LexerTest.php +++ b/tests/HTMLPurifier/LexerTest.php @@ -551,14 +551,14 @@ class HTMLPurifier_LexerTest extends HTMLPurifier_Harness new HTMLPurifier_Token_End('style'), ), ); - if (!defined('LIBXML_VERSION') || LIBXML_VERSION < 20628) { + if (!defined('LIBXML_VERSION')) { + // LIBXML_VERSION is missing in early versions of PHP + // prior to 1.30 of php-src/ext/libxml/libxml.c (version-wise, + // this translates to 5.0.x. In such cases, punt the test entirely. + return; + } elseif (LIBXML_VERSION < 20628) { // libxml's behavior is wrong prior to this version, so make // appropriate accomodations - // :NOTE: LIBXML_VERSION is missing in early versions of PHP - // prior to 1.30 of php-src/ext/libxml/libxml.c (version-wise, - // this translates to 5.0.x. In such cases, we assume that an old - // version of libxml is being used, although that *might* not - // be the case (it's very unlikely though) $extra['DOMLex'] = $extra['DirectLex']; } $this->assertTokenization(