From beb711d6a0fedac0d4ca3b9bae162a6ce9d6cdeb Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Sun, 30 Aug 2009 15:21:02 -0700 Subject: Rename clean_js to js_string and have it return a complete JS string (with delimiters) instead of just the string contents. Benefits: Using json_encode(), which is very robust. And as a user, it's clearer how to use this API compared to what it was before. --- modules/gallery/tests/Html_Helper_Test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/gallery/tests/Html_Helper_Test.php') diff --git a/modules/gallery/tests/Html_Helper_Test.php b/modules/gallery/tests/Html_Helper_Test.php index a9903256..f5ce7fa4 100644 --- a/modules/gallery/tests/Html_Helper_Test.php +++ b/modules/gallery/tests/Html_Helper_Test.php @@ -40,9 +40,9 @@ class Html_Helper_Test extends Unit_Test_Case { $safe_string_2); } - public function clean_js_test() { - $string = html::clean_js("hello's

world

"); - $this->assert_equal("hello\\'s

world<\\/p>", + public function js_string_test() { + $string = html::js_string("hello's

world

"); + $this->assert_equal('"hello\'s

world<\\/p>"', $string); } -- cgit v1.2.3