Fix test for new purifier API.

This commit is contained in:
Bharat Mediratta
2009-09-03 11:28:42 -07:00
parent 82dd468002
commit 1dca0b9d6b
+3 -2
View File
@@ -27,8 +27,9 @@ class Html_Helper_Test extends Unit_Test_Case {
public function purify_test() {
$safe_string = html::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->unescaped());
$this->assert_true($safe_string instanceof SafeString);
}