Aleksander Machniak
2013-05-28 5383ad72dbe4f722b124f5b697e258ccb11c3c8c
Add more tests for rcube_utils::explode_quoted_string()
1 files modified
17 ■■■■■ changed files
tests/Framework/Utils.php 17 ●●●●● patch | view | raw | blame | history
tests/Framework/Utils.php
@@ -195,6 +195,23 @@
    }
    /**
     * 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()