diff --git a/test/AllTests.php b/test/AllTests.php index 83dec0ce6..c14309d13 100644 --- a/test/AllTests.php +++ b/test/AllTests.php @@ -28,6 +28,7 @@ require_once './test/PMA_pow_test.php'; require_once './test/Environment_test.php'; require_once './test/escape_js_string.php'; require_once './test/PMA_isValid_test.php'; +require_once './test/PMA_transformation_getOptions_test.php'; class AllTests { @@ -51,6 +52,7 @@ class AllTests $suite->addTestSuite('PMA_pow_test'); $suite->addTestSuite('PMA_escapeJsString_test'); $suite->addTestSuite('PMA_isValid_test'); + $suite->addTestSuite('PMA_transformation_getOptions_test'); return $suite; } } diff --git a/test/PMA_transformation_getOptions_test.php b/test/PMA_transformation_getOptions_test.php new file mode 100644 index 000000000..6f3f3c908 --- /dev/null +++ b/test/PMA_transformation_getOptions_test.php @@ -0,0 +1,36 @@ +assertEquals(array('option1 ', ' option2 '), + PMA_transformation_getOptions("option1 , option2 ")); + } + + public function testQuoted() + { + $this->assertEquals(array('option1', ' option2'), + PMA_transformation_getOptions("'option1' ,' option2' ")); + } + + public function testComma() + { + $this->assertEquals(array('2,3', ' ,, option ,,'), + PMA_transformation_getOptions("'2,3' ,' ,, option ,,' ")); + } +} +?> \ No newline at end of file