mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 23:28:42 +00:00
Fix parse error in PHP4.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@81 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
4bf3305dff
commit
f0d74a3bf4
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
||||||
require_once 'HTMLPurifier/Lexer/PEARSax3.php';
|
require_once 'HTMLPurifier/Lexer/PEARSax3.php';
|
||||||
require_once 'HTMLPurifier/Lexer/DOMLex.php';
|
|
||||||
|
|
||||||
class Test_HTMLPurifier_Lexer extends UnitTestCase
|
class Test_HTMLPurifier_Lexer extends UnitTestCase
|
||||||
{
|
{
|
||||||
@ -13,9 +12,14 @@ class Test_HTMLPurifier_Lexer extends UnitTestCase
|
|||||||
function setUp() {
|
function setUp() {
|
||||||
$this->DirectLex = new HTMLPurifier_Lexer_DirectLex();
|
$this->DirectLex = new HTMLPurifier_Lexer_DirectLex();
|
||||||
$this->PEARSax3 = new HTMLPurifier_Lexer_PEARSax3();
|
$this->PEARSax3 = new HTMLPurifier_Lexer_PEARSax3();
|
||||||
$this->DOMLex = new HTMLPurifier_Lexer_DOMLex();
|
|
||||||
|
|
||||||
$this->_has_dom = version_compare(PHP_VERSION, '5', '>=');
|
$this->_has_dom = version_compare(PHP_VERSION, '5', '>=');
|
||||||
|
|
||||||
|
if ($this->_has_dom) {
|
||||||
|
require_once 'HTMLPurifier/Lexer/DOMLex.php';
|
||||||
|
$this->DOMLex = new HTMLPurifier_Lexer_DOMLex();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_nextWhiteSpace() {
|
function test_nextWhiteSpace() {
|
||||||
|
Loading…
Reference in New Issue
Block a user