Merge branch 'QA_3_3'
[phpmyadmin/dkf.git] / test / PMA_transformation_getOptions_test.php
blobb47812df57ac961a48185b55618389e0261efec6
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PMA_sanitize()
6 * @version $Id$
7 * @package phpMyAdmin-test
8 */
10 /**
13 require_once 'PHPUnit/Framework.php';
14 require_once './libraries/transformations.lib.php';
16 /**
17 * @package phpMyAdmin-test
19 class PMA_transformation_getOptions_test extends PHPUnit_Framework_TestCase
21 public function testDefault()
23 $this->assertEquals(array('option1 ', ' option2 '),
24 PMA_transformation_getOptions("option1 , option2 "));
27 public function testQuoted()
29 $this->assertEquals(array('option1', ' option2'),
30 PMA_transformation_getOptions("'option1' ,' option2' "));
33 public function testComma()
35 $this->assertEquals(array('2,3', ' ,, option ,,'),
36 PMA_transformation_getOptions("'2,3' ,' ,, option ,,' "));
39 public function testEmptyOptions()
41 $this->assertEquals(array('', '', ''),
42 PMA_transformation_getOptions("'',,"));
45 public function testEmpty()
47 $this->assertEquals(array(),
48 PMA_transformation_getOptions(''));