2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * tests for PMA_sanitize()
7 * @package phpMyAdmin-test
13 require_once 'PHPUnit/Framework.php';
14 require_once './libraries/transformations.lib.php';
16 class PMA_transformation_getOptions_test
extends PHPUnit_Framework_TestCase
18 public function testDefault()
20 $this->assertEquals(array('option1 ', ' option2 '),
21 PMA_transformation_getOptions("option1 , option2 "));
24 public function testQuoted()
26 $this->assertEquals(array('option1', ' option2'),
27 PMA_transformation_getOptions("'option1' ,' option2' "));
30 public function testComma()
32 $this->assertEquals(array('2,3', ' ,, option ,,'),
33 PMA_transformation_getOptions("'2,3' ,' ,, option ,,' "));
36 public function testEmptyOptions()
38 $this->assertEquals(array('', '', ''),
39 PMA_transformation_getOptions("'',,"));
42 public function testEmpty()
44 $this->assertEquals(array(),
45 PMA_transformation_getOptions(''));