From 33bcf11e2714f727f16136a1c09926cd5b6c8212 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 3 Sep 2009 01:05:03 -0700 Subject: Change the Html_Helper and SafeString tests to change the expeced results based on whether HtmlPurifier module is installed or not --- modules/gallery/tests/Html_Helper_Test.php | 5 +++-- modules/gallery/tests/SafeString_Test.php | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gallery/tests/Html_Helper_Test.php b/modules/gallery/tests/Html_Helper_Test.php index bfce6dcf..8f665e0c 100644 --- a/modules/gallery/tests/Html_Helper_Test.php +++ b/modules/gallery/tests/Html_Helper_Test.php @@ -27,8 +27,9 @@ class Html_Helper_Test extends Unit_Test_Case { public function purify_test() { $safe_string = html::purify("hello

world

"); - $this->assert_equal("hello

world

", - $safe_string); + $expected = + module::is_active("htmlpurifier") ? "hello

world

" : "hello <p >world</p>"; + $this->assert_equal($expected, $safe_string->unescaped()); $this->assert_true($safe_string instanceof SafeString); } diff --git a/modules/gallery/tests/SafeString_Test.php b/modules/gallery/tests/SafeString_Test.php index 0895b7dd..37a1865f 100644 --- a/modules/gallery/tests/SafeString_Test.php +++ b/modules/gallery/tests/SafeString_Test.php @@ -91,7 +91,9 @@ class SafeString_Test extends Unit_Test_Case { public function purify_test() { $safe_string = SafeString::purify("hello

world

"); - $this->assert_equal("hello

world

", $safe_string); + $expected = + module::is_active("htmlpurifier") ? "hello

world

" : "hello <p >world</p>"; + $this->assert_equal($expected, $safe_string->unescaped()); } public function of_fluid_api_test() { -- cgit v1.2.3