2.11.6
[phpmyadmin/arisferyanto.git] / test / PMA_transformation_getOptions_test.php
blob20ac9ed69d879208757f8bee170c67bcbf94c0a3
1 <?php
2 /* vim: expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PMA_sanitize()
6 * @version $Id: PMA_sanitize_test.php 10140 2007-03-20 08:32:55Z cybot_tm $
7 * @package phpMyAdmin-test
8 */
10 /**
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(''));