summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-28 21:10:14 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-28 21:10:14 +0200
commit5383ad72dbe4f722b124f5b697e258ccb11c3c8c (patch)
treed46f5637dacc75a4eb099fba194f76ad5c723aaa /tests
parentfe0f1d589b2320905fa3dd73737d5b7b1cbc402a (diff)
Add more tests for rcube_utils::explode_quoted_string()
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/Utils.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index 65efeecff..c62e688eb 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -195,6 +195,23 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
}
/**
+ * Check rcube_utils::explode_quoted_string()
+ */
+ function test_explode_quoted_string()
+ {
+ $data = array(
+ '"a,b"' => array('"a,b"'),
+ '"a,b","c,d"' => array('"a,b"','"c,d"'),
+ '"a,\\"b",d' => array('"a,\\"b"', 'd'),
+ );
+
+ foreach ($data as $text => $res) {
+ $result = rcube_utils::explode_quoted_string(',', $text);
+ $this->assertSame($res, $result);
+ }
+ }
+
+ /**
* Check rcube_utils::explode_quoted_string() compat. with explode()
*/
function test_explode_quoted_string_compat()