From e2b8d630e2ac84950726beb44221b9efeb52b54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 23 Aug 2012 09:11:41 +0200 Subject: [PATCH] Define some required params --- test/libraries/PMA_operations_test.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/libraries/PMA_operations_test.php b/test/libraries/PMA_operations_test.php index 16565642f8..c2bc3dd602 100644 --- a/test/libraries/PMA_operations_test.php +++ b/test/libraries/PMA_operations_test.php @@ -15,9 +15,32 @@ require_once 'libraries/url_generating.lib.php'; require_once 'libraries/php-gettext/gettext.inc'; require_once 'libraries/relation.lib.php'; require_once 'libraries/CommonFunctions.class.php'; +require_once 'libraries/Theme.class.php'; class PMA_operations_test extends PHPUnit_Framework_TestCase { + /** + * Set up global environment. + */ + public function setup() { + $GLOBALS['table'] = 'table'; + $GLOBALS['db'] = 'db'; + $_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme'); + $GLOBALS['cfg'] = array('MySQLManualType' => 'viewable', 'AjaxEnable' => true); + + if (! function_exists('PMA_generateCharsetDropdownBox')) { + function PMA_generateCharsetDropdownBox() + { + } + } + if (! defined('PMA_CSDROPDOWN_CHARSET')) { + define('PMA_CSDROPDOWN_CHARSET', ''); + } + if (! defined('PMA_CSDROPDOWN_COLLATION')) { + define('PMA_CSDROPDOWN_COLLATION', ''); + } + } + /** * Test for PMA_getHtmlForDatabaseComment */