From 24efff0535e1ed41c334343e9f3b4230dbe3b3e1 Mon Sep 17 00:00:00 2001 From: adamgsoc2013 Date: Mon, 1 Jul 2013 22:26:50 +0800 Subject: [PATCH] fix the undefined error in UT --- test/libraries/PMA_ConfigFile_test.php | 1 + test/libraries/PMA_Tracker_test.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/libraries/PMA_ConfigFile_test.php b/test/libraries/PMA_ConfigFile_test.php index 367fcf9621..d876ba03bd 100644 --- a/test/libraries/PMA_ConfigFile_test.php +++ b/test/libraries/PMA_ConfigFile_test.php @@ -31,6 +31,7 @@ class PMA_ConfigFile_Test extends PHPUnit_Framework_TestCase */ protected function setUp() { + $GLOBALS['server'] = 1; $GLOBALS['cfg']['AvailableCharsets'] = array(); $this->object = ConfigFile::getInstance(); $this->server = $GLOBALS['server']; diff --git a/test/libraries/PMA_Tracker_test.php b/test/libraries/PMA_Tracker_test.php index c3d27df996..8e5cb15d4f 100644 --- a/test/libraries/PMA_Tracker_test.php +++ b/test/libraries/PMA_Tracker_test.php @@ -32,7 +32,7 @@ class PMA_Tracker_Test extends PHPUnit_Framework_TestCase /** * SET these to avoid undefined index error */ - + $GLOBALS['server'] = 1; $GLOBALS['cfg']['Server']['pmadb'] = ''; $GLOBALS['cfg']['Server']['tracking'] = ''; $GLOBALS['cfg']['Server']['tracking_add_drop_table'] = '';