From 4c200f6bcbbd3f4c019c47cdac48debcedb98153 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 24 Jul 2006 02:33:07 +0000 Subject: [PATCH] Extract RemoveForeignElementsTest from Definition. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@116 48356398-32a2-884e-a903-53898d9a118a --- .../Strategy/RemoveForeignElementsTest.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php diff --git a/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php b/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php new file mode 100644 index 00000000..cee1f8fc --- /dev/null +++ b/tests/HTMLPurifier/Strategy/RemoveForeignElementsTest.php @@ -0,0 +1,38 @@ +bold text.'; + $expect[1] = $inputs[1]; + + // [INVALID] + $inputs[2] = 'BlingBong'; + $expect[2] = htmlspecialchars($inputs[2]); + + foreach ($inputs as $i => $input) { + $tokens = $this->lex->tokenizeHTML($input); + $result_tokens = $this->strategy->execute($tokens); + $result = $this->gen->generateFromTokens($result_tokens); + $this->assertEqual($expect[$i], $result, "Test $i: %s"); + paintIf($result, $result != $expect[$i]); + } + + } + +} + +?> \ No newline at end of file