diff options
author | tiyowan <tiyowan@gmail.com> | 2012-03-16 16:08:34 +0100 |
---|---|---|
committer | tiyowan <tiyowan@gmail.com> | 2012-03-16 16:11:31 +0100 |
commit | 3fb5aa5886de15ef68e40b556a6ea3f1badf962e (patch) | |
tree | be70a71e55eb520ccee124674ebad36a1ad7ab0e /tests | |
parent | 039ebcd0bf47d0c4f94abb9d5d60c1692c98aece (diff) |
Add unit test for strip_slashes() in string_helper.php
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/helpers/string_helper_test.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/codeigniter/helpers/string_helper_test.php b/tests/codeigniter/helpers/string_helper_test.php index 2d7f96aa5..a884d6284 100644 --- a/tests/codeigniter/helpers/string_helper_test.php +++ b/tests/codeigniter/helpers/string_helper_test.php @@ -4,6 +4,21 @@ require_once(BASEPATH.'helpers/string_helper.php'); class String_helper_test extends CI_TestCase { + public function test_strip_slashes() + { + $expected = array( + "Is your name O'reilly?", + "No, my name is O'connor." + ); + + $str = array( + "Is your name O\'reilly?", + "No, my name is O\'connor." + ); + + $this->assertEquals($expected, strip_slashes($str)); + } + public function test_trim_slashes() { $strs = array( |