diff --git a/test/bootstrap-static.php b/test/bootstrap-static.php index 086b2f9b9c..fbbd7023ff 100644 --- a/test/bootstrap-static.php +++ b/test/bootstrap-static.php @@ -30,7 +30,7 @@ $GLOBALS['server'] = 0; define('PMA_PATH_TO_BASEDIR', ''); define('PMA_USR_BROWSER_AGENT', 'CHROME'); define('PMA_USR_BROWSER_VER', 1); -define('PMA_USR_OS', 'os'); +define('PMA_USR_OS', 'Other'); define('PMA_IS_WINDOWS', false); // phpcs:enable diff --git a/test/classes/ErrorReportTest.php b/test/classes/ErrorReportTest.php index 0e4baacf1e..72faaea70c 100644 --- a/test/classes/ErrorReportTest.php +++ b/test/classes/ErrorReportTest.php @@ -11,8 +11,6 @@ use PhpMyAdmin\Template; use PhpMyAdmin\Utils\HttpRequest; use PhpMyAdmin\Version; -use function define; -use function defined; use function htmlspecialchars; use function json_encode; use function phpversion; @@ -41,18 +39,7 @@ class ErrorReportTest extends AbstractTestCase $_SERVER['HTTP_USER_AGENT'] = 'HTTP_USER_AGENT'; $_COOKIE['pma_lang'] = 'en'; $GLOBALS['config']->set('is_https', false); - - if (! defined('PMA_USR_BROWSER_AGENT')) { - define('PMA_USR_BROWSER_AGENT', 'Other'); - } - - if (! defined('PMA_USR_BROWSER_VER')) { - define('PMA_USR_BROWSER_VER', 1); - } - - if (! defined('PMA_USR_OS')) { - define('PMA_USR_OS', 'os'); - } + $GLOBALS['config']->enableBc(); $template = new Template(); $this->errorReport = new ErrorReport( diff --git a/test/classes/NormalizationTest.php b/test/classes/NormalizationTest.php index 558416be73..0191e49d0d 100644 --- a/test/classes/NormalizationTest.php +++ b/test/classes/NormalizationTest.php @@ -142,10 +142,19 @@ class NormalizationTest extends AbstractTestCase $GLOBALS['cfg']['BrowseMIME'] = true; $GLOBALS['cfg']['MaxRows'] = 25; $GLOBALS['col_priv'] = false; - $db = 'PMA_db'; - $table = 'PMA_table'; + $GLOBALS['cfg']['Server']['DisableIS'] = false; + $GLOBALS['dbi'] = $this->dbi; + $db = 'testdb'; + $table = 'mytable'; $numFields = 1; - $result = $this->normalization->getHtmlForCreateNewColumn($numFields, $db, $table); + $template = new Template(); + $normalization = new Normalization( + $this->dbi, + new Relation($this->dbi, $template), + new Transformations(), + $template + ); + $result = $normalization->getHtmlForCreateNewColumn($numFields, $db, $table); $this->assertStringContainsString( '