The branch, master has been updated via 43161e7876fc27975ea27e44d21401d5cbcb95ab (commit) from cdd2044274fa8de257fbdc873d9df57922c8ba19 (commit)
- Log ----------------------------------------------------------------- commit 43161e7876fc27975ea27e44d21401d5cbcb95ab Author: Michal Čihař mcihar@suse.cz Date: Fri Aug 5 16:01:39 2011 +0200
Ensure that ColumnTypes is set on test run
-----------------------------------------------------------------------
Summary of changes: .../rte/PMA_RTN_getDataFromRequest_test.php | 10 +++++----- test/libraries/rte/PMA_RTN_getEditorForm_test.php | 3 ++- test/libraries/rte/PMA_RTN_getExecuteForm_test.php | 2 +- .../rte/PMA_RTN_getQueryFromRequest_test.php | 9 +-------- 4 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php b/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php index d24de2b..1a75ca7 100644 --- a/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php +++ b/test/libraries/rte/PMA_RTN_getDataFromRequest_test.php @@ -6,7 +6,6 @@ * @package phpMyAdmin-test */
-require_once 'libraries/data_mysql.inc.php'; require_once 'libraries/common.lib.php';
@@ -17,6 +16,11 @@ require_once 'libraries/rte/rte_routines.lib.php';
class PMA_RTN_getDataFromRequest_test extends PHPUnit_Framework_TestCase { + public function setUp() + { + require 'libraries/data_mysql.inc.php'; + } + /** * @dataProvider provider */ @@ -24,10 +28,6 @@ class PMA_RTN_getDataFromRequest_test extends PHPUnit_Framework_TestCase { global $cfg, $_REQUEST;
- if (! isset($cfg['ColumnTypes'])) { - $this->markTestSkipped('Can't get column types'); // FIXME - } - unset($_REQUEST); foreach ($in as $key => $value) { if ($value !== '') { diff --git a/test/libraries/rte/PMA_RTN_getEditorForm_test.php b/test/libraries/rte/PMA_RTN_getEditorForm_test.php index ef96a79..ac1ba52 100644 --- a/test/libraries/rte/PMA_RTN_getEditorForm_test.php +++ b/test/libraries/rte/PMA_RTN_getEditorForm_test.php @@ -6,7 +6,6 @@ * @package phpMyAdmin-test */ require_once 'libraries/common.lib.php'; -require_once 'libraries/data_mysql.inc.php'; require_once 'libraries/php-gettext/gettext.inc'; require_once 'libraries/url_generating.lib.php'; /* @@ -18,6 +17,8 @@ class PMA_RTN_getEditorForm_test extends PHPUnit_Framework_TestCase { public function setUp() { + require 'libraries/data_mysql.inc.php'; + if (! function_exists('PMA_generateCharsetDropdownBox')) { function PMA_generateCharsetDropdownBox() {} } diff --git a/test/libraries/rte/PMA_RTN_getExecuteForm_test.php b/test/libraries/rte/PMA_RTN_getExecuteForm_test.php index eab74b4..f74f5a3 100644 --- a/test/libraries/rte/PMA_RTN_getExecuteForm_test.php +++ b/test/libraries/rte/PMA_RTN_getExecuteForm_test.php @@ -53,7 +53,7 @@ class PMA_RTN_getExecuteForm_test extends PHPUnit_Framework_TestCase $cfg['DefaultFunctions']['FUNC_DATE'] = ''; $GLOBALS['tear_down']['default'] = true; } - eval(substr(file_get_contents('libraries/data_mysql.inc.php'), 5, -3)); // FIXME + require 'libraries/data_mysql.inc.php'; }
public function tearDown() diff --git a/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php b/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php index 175c95b..db11ff4 100644 --- a/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php +++ b/test/libraries/rte/PMA_RTN_getQueryFromRequest_test.php @@ -9,7 +9,6 @@ /* * Needed for PMA_backquote() and PMA_RTN_getQueryFromRequest() */ -//require_once 'libraries/data_mysql.inc.php'; require_once 'libraries/common.lib.php'; require_once 'libraries/php-gettext/gettext.inc';
@@ -28,15 +27,9 @@ class PMA_RTN_getQueryFromRequest_test extends PHPUnit_Framework_TestCase { global $_REQUEST, $errors, $cfg;
- // FIXME: the below two lines are needed to get the test to work, - // but are definitely the wrong way to go about the issue - // of $cfg['ColumnTypes'] being undefined $cfg['ShowFunctionFields'] = false; - eval(substr(file_get_contents('libraries/data_mysql.inc.php'), 5, -3));
- if (! isset($cfg['ColumnTypes'])) { - $this->markTestSkipped('Can't get column types'); // FIXME - } + require 'libraries/data_mysql.inc.php';
$errors = array(); PMA_RTN_setGlobals();
hooks/post-receive