added testsuite for PMA_transformation_getOptions()
This commit is contained in:
@@ -28,6 +28,7 @@ require_once './test/PMA_pow_test.php';
|
|||||||
require_once './test/Environment_test.php';
|
require_once './test/Environment_test.php';
|
||||||
require_once './test/escape_js_string.php';
|
require_once './test/escape_js_string.php';
|
||||||
require_once './test/PMA_isValid_test.php';
|
require_once './test/PMA_isValid_test.php';
|
||||||
|
require_once './test/PMA_transformation_getOptions_test.php';
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
{
|
{
|
||||||
@@ -51,6 +52,7 @@ class AllTests
|
|||||||
$suite->addTestSuite('PMA_pow_test');
|
$suite->addTestSuite('PMA_pow_test');
|
||||||
$suite->addTestSuite('PMA_escapeJsString_test');
|
$suite->addTestSuite('PMA_escapeJsString_test');
|
||||||
$suite->addTestSuite('PMA_isValid_test');
|
$suite->addTestSuite('PMA_isValid_test');
|
||||||
|
$suite->addTestSuite('PMA_transformation_getOptions_test');
|
||||||
return $suite;
|
return $suite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
test/PMA_transformation_getOptions_test.php
Normal file
36
test/PMA_transformation_getOptions_test.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/* vim: expandtab sw=4 ts=4 sts=4: */
|
||||||
|
/**
|
||||||
|
* tests for PMA_sanitize()
|
||||||
|
*
|
||||||
|
* @version $Id: PMA_sanitize_test.php 10140 2007-03-20 08:32:55Z cybot_tm $
|
||||||
|
* @package phpMyAdmin-test
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
require_once 'PHPUnit/Framework.php';
|
||||||
|
require_once './libraries/transformations.lib.php';
|
||||||
|
|
||||||
|
class PMA_transformation_getOptions_test extends PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
public function testDefault()
|
||||||
|
{
|
||||||
|
$this->assertEquals(array('option1 ', ' option2 '),
|
||||||
|
PMA_transformation_getOptions("option1 , option2 "));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testQuoted()
|
||||||
|
{
|
||||||
|
$this->assertEquals(array('option1', ' option2'),
|
||||||
|
PMA_transformation_getOptions("'option1' ,' option2' "));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testComma()
|
||||||
|
{
|
||||||
|
$this->assertEquals(array('2,3', ' ,, option ,,'),
|
||||||
|
PMA_transformation_getOptions("'2,3' ,' ,, option ,,' "));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
Reference in New Issue
Block a user