From 1ab3ae160a272e6c9fe10aab05b72b50586383c4 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 22 Jul 2006 15:38:41 +0000 Subject: [PATCH] Move classes into Zend style setup. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@88 48356398-32a2-884e-a903-53898d9a118a --- benchmarks/Lexer.php | 2 +- HTMLPurifier.php => library/HTMLPurifier.php | 0 AttrDef.php => library/HTMLPurifier/AttrDef.php | 0 .../HTMLPurifier/ChildDef.php | 0 .../HTMLPurifier/Definition.php | 0 .../HTMLPurifier/Generator.php | 0 Lexer.php => library/HTMLPurifier/Lexer.php | 0 {Lexer => library/HTMLPurifier/Lexer}/DOMLex.php | 0 .../HTMLPurifier/Lexer}/DirectLex.php | 0 .../HTMLPurifier/Lexer}/PEARSax3.php | 0 Token.php => library/HTMLPurifier/Token.php | 0 tests/HTMLPurifier.php | 16 ---------------- .../ChildDefTest.php} | 4 ++-- .../DefinitionTest.php} | 4 ++-- .../GeneratorTest.php} | 4 ++-- tests/{Lexer.php => HTMLPurifier/LexerTest.php} | 2 +- tests/HTMLPurifierTest.php | 16 ++++++++++++++++ tests/index.php | 14 +++++++------- 18 files changed, 31 insertions(+), 31 deletions(-) rename HTMLPurifier.php => library/HTMLPurifier.php (100%) rename AttrDef.php => library/HTMLPurifier/AttrDef.php (100%) rename ChildDef.php => library/HTMLPurifier/ChildDef.php (100%) rename Definition.php => library/HTMLPurifier/Definition.php (100%) rename Generator.php => library/HTMLPurifier/Generator.php (100%) rename Lexer.php => library/HTMLPurifier/Lexer.php (100%) rename {Lexer => library/HTMLPurifier/Lexer}/DOMLex.php (100%) rename {Lexer => library/HTMLPurifier/Lexer}/DirectLex.php (100%) rename {Lexer => library/HTMLPurifier/Lexer}/PEARSax3.php (100%) rename Token.php => library/HTMLPurifier/Token.php (100%) delete mode 100644 tests/HTMLPurifier.php rename tests/{ChildDef.php => HTMLPurifier/ChildDefTest.php} (94%) rename tests/{Definition.php => HTMLPurifier/DefinitionTest.php} (96%) rename tests/{Generator.php => HTMLPurifier/GeneratorTest.php} (93%) rename tests/{Lexer.php => HTMLPurifier/LexerTest.php} (96%) create mode 100644 tests/HTMLPurifierTest.php diff --git a/benchmarks/Lexer.php b/benchmarks/Lexer.php index a11f8909..a1c2a424 100644 --- a/benchmarks/Lexer.php +++ b/benchmarks/Lexer.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/tests/ChildDef.php b/tests/HTMLPurifier/ChildDefTest.php similarity index 94% rename from tests/ChildDef.php rename to tests/HTMLPurifier/ChildDefTest.php index 0d5f9977..a95589ab 100644 --- a/tests/ChildDef.php +++ b/tests/HTMLPurifier/ChildDefTest.php @@ -4,13 +4,13 @@ require_once 'HTMLPurifier/ChildDef.php'; require_once 'HTMLPurifier/Lexer.php'; require_once 'HTMLPurifier/Generator.php'; -class Test_HTMLPurifier_ChildDef extends UnitTestCase +class HTMLPurifier_ChildDefTest extends UnitTestCase { var $lex; var $gen; - function Test_HTMLPurifier_ChildDef() { + function HTMLPurifier_ChildDefTest() { $this->lex = HTMLPurifier_Lexer::create(); $this->gen = new HTMLPurifier_Generator(); parent::UnitTestCase(); diff --git a/tests/Definition.php b/tests/HTMLPurifier/DefinitionTest.php similarity index 96% rename from tests/Definition.php rename to tests/HTMLPurifier/DefinitionTest.php index c4c8f923..30dc24bc 100644 --- a/tests/Definition.php +++ b/tests/HTMLPurifier/DefinitionTest.php @@ -3,12 +3,12 @@ require_once 'HTMLPurifier/Definition.php'; require_once 'HTMLPurifier/Lexer.php'; -class Test_HTMLPurifier_Definition extends UnitTestCase +class HTMLPurifier_DefinitionTest extends UnitTestCase { var $def, $lex; - function Test_HTMLPurifier_Definition() { + function HTMLPurifier_DefinitionTest() { $this->UnitTestCase(); $this->def = new HTMLPurifier_Definition(); $this->def->loadData(); diff --git a/tests/Generator.php b/tests/HTMLPurifier/GeneratorTest.php similarity index 93% rename from tests/Generator.php rename to tests/HTMLPurifier/GeneratorTest.php index ec215ec2..f39280ef 100644 --- a/tests/Generator.php +++ b/tests/HTMLPurifier/GeneratorTest.php @@ -2,12 +2,12 @@ require_once 'HTMLPurifier/Generator.php'; -class Test_HTMLPurifier_Generator extends UnitTestCase +class HTMLPurifier_GeneratorTest extends UnitTestCase { var $gen; - function Test_HTMLPurifier_Generator() { + function HTMLPurifier_GeneratorTest() { $this->UnitTestCase(); $this->gen = new HTMLPurifier_Generator(); } diff --git a/tests/Lexer.php b/tests/HTMLPurifier/LexerTest.php similarity index 96% rename from tests/Lexer.php rename to tests/HTMLPurifier/LexerTest.php index 20891c78..421805e9 100644 --- a/tests/Lexer.php +++ b/tests/HTMLPurifier/LexerTest.php @@ -3,7 +3,7 @@ require_once 'HTMLPurifier/Lexer/DirectLex.php'; require_once 'HTMLPurifier/Lexer/PEARSax3.php'; -class Test_HTMLPurifier_Lexer extends UnitTestCase +class HTMLPurifier_LexerTest extends UnitTestCase { var $DirectLex, $PEARSax3, $DOMLex; diff --git a/tests/HTMLPurifierTest.php b/tests/HTMLPurifierTest.php new file mode 100644 index 00000000..19e6d280 --- /dev/null +++ b/tests/HTMLPurifierTest.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/tests/index.php b/tests/index.php index 625a34c9..770cd5c0 100644 --- a/tests/index.php +++ b/tests/index.php @@ -3,16 +3,16 @@ load_simpletest(); // includes all relevant simpletest files // emulates inserting a dir called HTMLPurifier into your class dir -set_include_path(get_include_path() . PATH_SEPARATOR . '../../'); +set_include_path(get_include_path() . PATH_SEPARATOR . '../library'); $test = new GroupTest('HTMLPurifier'); -$test->addTestFile('HTMLPurifier.php'); -$test->addTestFile('Lexer.php'); -//$test->addTestFile('Token.php'); -$test->addTestFile('Definition.php'); -$test->addTestFile('ChildDef.php'); -$test->addTestFile('Generator.php'); +$test->addTestFile('HTMLPurifierTest.php'); +$test->addTestFile('HTMLPurifier/LexerTest.php'); +//$test->addTestFile('TokenTest.php'); +$test->addTestFile('HTMLPurifier/DefinitionTest.php'); +$test->addTestFile('HTMLPurifier/ChildDefTest.php'); +$test->addTestFile('HTMLPurifier/GeneratorTest.php'); $test->run( new HtmlReporter() );