diff --git a/test/classes/PMA_PDF_test.php b/test/classes/PMA_PDF_test.php index 19252f6648..a8222833a4 100644 --- a/test/classes/PMA_PDF_test.php +++ b/test/classes/PMA_PDF_test.php @@ -12,13 +12,16 @@ require_once 'libraries/CommonFunctions.class.php'; require_once 'libraries/PDF.class.php'; require_once 'libraries/php-gettext/gettext.inc'; - -if (!defined('PMA_VERSION')) { - define('PMA_VERSION', 'TEST'); -} +require_once 'libraries/core.lib.php'; +require_once 'libraries/Config.class.php'; class PMA_PDF_test extends PHPUnit_Framework_TestCase { + public function setup() + { + $GLOBALS['PMA_Config'] = new PMA_Config(); + $GLOBALS['PMA_Config']->enableBc(); + } /** * @group large */ diff --git a/test/libraries/common/PMA_expandUserString_test.php b/test/libraries/common/PMA_expandUserString_test.php index a6c9d4ab79..c5b2fb61ba 100644 --- a/test/libraries/common/PMA_expandUserString_test.php +++ b/test/libraries/common/PMA_expandUserString_test.php @@ -12,10 +12,7 @@ */ require_once 'libraries/core.lib.php'; require_once 'libraries/CommonFunctions.class.php'; - -if (!defined('PMA_VERSION')) { - define('PMA_VERSION', 'TEST'); -} +require_once 'libraries/Config.class.php'; /** * Test for PMA_CommonFunctions::expandUserString function. @@ -28,6 +25,8 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase */ public function setup() { + $GLOBALS['PMA_Config'] = new PMA_Config(); + $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['cfg'] = array( 'Server' => array( 'host' => 'host&', @@ -44,6 +43,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase */ public function testExpand($in, $out) { + $out = str_replace('PMA_VERSION', PMA_VERSION, $out); $this->assertEquals( $out, PMA_CommonFunctions::getInstance()->expandUserString($in) ); @@ -56,6 +56,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase */ public function testExpandEscape($in, $out) { + $out = str_replace('PMA_VERSION', PMA_VERSION, $out); $this->assertEquals( htmlspecialchars($out), PMA_CommonFunctions::getInstance() @@ -76,7 +77,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase array('@DATABASE@', 'database'), array('@TABLE@', 'table'), array('@IGNORE@', '@IGNORE@'), - array('@PHPMYADMIN@', 'phpMyAdmin ' . PMA_VERSION), + array('@PHPMYADMIN@', 'phpMyAdmin PMA_VERSION'), ); } }