summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorEric Barnes <eric@ericlbarnes.com>2012-03-16 16:42:18 +0100
committerEric Barnes <eric@ericlbarnes.com>2012-03-16 16:42:18 +0100
commit7e0860bf27a78d4fa67f6470e09e45ac1f0209d0 (patch)
treebe70a71e55eb520ccee124674ebad36a1ad7ab0e /tests/codeigniter
parent039ebcd0bf47d0c4f94abb9d5d60c1692c98aece (diff)
parent3fb5aa5886de15ef68e40b556a6ea3f1badf962e (diff)
Merge pull request #1192 from tiyowan/string-helper-tests
Add unit test for strip_slashes() in string_helper.php
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/helpers/string_helper_test.php15
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(