summaryrefslogtreecommitdiff
path: root/tests/Framework
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-15 15:36:10 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-15 15:36:10 +0100
commit3a54cc50134806cc8e53abf0efa6faf416182990 (patch)
tree154754539b9e5b8d32dbd1665a21e8d79e56aac6 /tests/Framework
parentc8558a182cc218e4aba89f6c42a9e39de20bc0e6 (diff)
Fix rcube_utils::explode_quoted_string() with explode(), added tests
Diffstat (limited to 'tests/Framework')
-rw-r--r--tests/Framework/Utils.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index e58835956..ec61c5d4b 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -193,4 +193,17 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
$mod = rcube_utils::mod_css_styles("background:\\0075\\0072\\006c( javascript:alert(&#039;xss&#039;) )", 'rcmbody');
$this->assertEquals("/* evil! */", $mod, "Don't allow encoding quirks (2)");
}
+
+ /**
+ * Check rcube_utils::explode_quoted_string() compat. with explode()
+ */
+ function test_explode_quoted_string_compat()
+ {
+ $data = array('', 'a,b,c', 'a', ',', ',a');
+
+ foreach ($data as $text) {
+ $result = rcube_utils::explode_quoted_string(',', $text);
+ $this->assertSame(explode(',', $text), $result);
+ }
+ }
}