2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * tests for PMA_sanitize()
6 * @package phpMyAdmin-test
12 require_once 'PHPUnit/Framework.php';
13 require_once './libraries/transformations.lib.php';
16 * @package phpMyAdmin-test
18 class PMA_transformation_getOptions_test
extends PHPUnit_Framework_TestCase
20 public function testDefault()
22 $this->assertEquals(array('option1 ', ' option2 '),
23 PMA_transformation_getOptions("option1 , option2 "));
26 public function testQuoted()
28 $this->assertEquals(array('option1', ' option2'),
29 PMA_transformation_getOptions("'option1' ,' option2' "));
32 public function testComma()
34 $this->assertEquals(array('2,3', ' ,, option ,,'),
35 PMA_transformation_getOptions("'2,3' ,' ,, option ,,' "));
38 public function testEmptyOptions()
40 $this->assertEquals(array('', '', ''),
41 PMA_transformation_getOptions("'',,"));
44 public function testEmpty()
46 $this->assertEquals(array(),
47 PMA_transformation_getOptions(''));