2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * tests for PMA_sanitize()
6 * @package phpMyAdmin-test
12 require_once 'libraries/transformations.lib.php';
14 class PMA_transformation_getOptions_test
extends PHPUnit_Framework_TestCase
16 public function testDefault()
18 $this->assertEquals(array('option1 ', ' option2 '),
19 PMA_transformation_getOptions("option1 , option2 "));
22 public function testQuoted()
24 $this->assertEquals(array('option1', ' option2'),
25 PMA_transformation_getOptions("'option1' ,' option2' "));
28 public function testComma()
30 $this->assertEquals(array('2,3', ' ,, option ,,'),
31 PMA_transformation_getOptions("'2,3' ,' ,, option ,,' "));
34 public function testEmptyOptions()
36 $this->assertEquals(array('', '', ''),
37 PMA_transformation_getOptions("'',,"));
40 public function testEmpty()
42 $this->assertEquals(array(),
43 PMA_transformation_getOptions(''));