summaryrefslogtreecommitdiff
path: root/modules/gallery/tests/SafeString_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-03 11:29:57 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-03 11:29:57 -0700
commit1405e8ed9e2003d1b06853bae4ce3413de1910ce (patch)
treed4d71207ed7b08d395693b555fa24e53696fccfa /modules/gallery/tests/SafeString_Test.php
parent1dca0b9d6be5a96e79e3de776e231e21ed824589 (diff)
Fix tests for new purifier API.
Diffstat (limited to 'modules/gallery/tests/SafeString_Test.php')
-rw-r--r--modules/gallery/tests/SafeString_Test.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/gallery/tests/SafeString_Test.php b/modules/gallery/tests/SafeString_Test.php
index 57ac87b9..fdab5c58 100644
--- a/modules/gallery/tests/SafeString_Test.php
+++ b/modules/gallery/tests/SafeString_Test.php
@@ -91,16 +91,18 @@ class SafeString_Test extends Unit_Test_Case {
public function purify_test() {
$safe_string = SafeString::purify("hello <p >world</p>");
- $expected =
- module::is_active("htmlpurifier") ? "hello <p>world</p>" : "hello &lt;p &gt;world&lt;/p&gt;";
+ $expected = method_exists("purifier", "purify")
+ ? "hello <p>world</p>"
+ : "hello &lt;p &gt;world&lt;/p&gt;";
$this->assert_equal($expected, $safe_string);
}
public function purify_twice_test() {
$safe_string = SafeString::purify("hello <p >world</p>");
$safe_string_2 = SafeString::purify($safe_string);
- $expected =
- module::is_active("htmlpurifier") ? "hello <p>world</p>" : "hello &lt;p &gt;world&lt;/p&gt;";
+ $expected = method_exists("purifier", "purify")
+ ? "hello <p>world</p>"
+ : "hello &lt;p &gt;world&lt;/p&gt;";
$this->assert_equal($expected, $safe_string_2);
}