Add more tests for rcube_utils::explode_quoted_string()

pull/76/merge
Aleksander Machniak 12 years ago
parent fe0f1d589b
commit 5383ad72db

@ -194,6 +194,23 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
$this->assertEquals("/* evil! */", $mod, "Don't allow encoding quirks (2)");
}
/**
* 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()
*/

Loading…
Cancel
Save