From ae575ffb1466aa4edaf5cd0c53b293ff586cbfc1 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Thu, 21 May 2020 14:55:53 +0200 Subject: [PATCH] Fix running tests in --process-isolation Signed-off-by: William Desportes --- test/classes/CharsetsTest.php | 1 + test/classes/Config/FormDisplayTest.php | 2 +- test/classes/Config/FormTest.php | 2 +- test/classes/ConfigTest.php | 1 + .../Controllers/Database/PrivilegesControllerTest.php | 1 + .../Controllers/Database/StructureControllerTest.php | 1 + .../Controllers/Server/Status/VariablesControllerTest.php | 1 + test/classes/Controllers/Server/VariablesControllerTest.php | 2 ++ .../classes/Controllers/Table/FindReplaceControllerTest.php | 1 + test/classes/Controllers/Table/IndexesControllerTest.php | 1 + test/classes/Controllers/Table/PrivilegesControllerTest.php | 2 ++ test/classes/Controllers/Table/RelationControllerTest.php | 1 + test/classes/Controllers/Table/SearchControllerTest.php | 1 + test/classes/Controllers/Table/StructureControllerTest.php | 1 + test/classes/CoreTest.php | 1 + test/classes/Database/Designer/CommonTest.php | 1 + test/classes/Database/DesignerTest.php | 2 ++ test/classes/Database/QbeTest.php | 1 + test/classes/Database/TriggersTest.php | 2 ++ test/classes/DatabaseInterfaceTest.php | 1 + test/classes/Display/ResultsTest.php | 3 ++- test/classes/ErrorReportTest.php | 1 + test/classes/FilesTest.php | 5 +++-- test/classes/HeaderTest.php | 1 + test/classes/InsertEditTest.php | 1 + test/classes/MenuTest.php | 1 + test/classes/Navigation/Nodes/NodeDatabaseChildTest.php | 1 + test/classes/Navigation/Nodes/NodeDatabaseTest.php | 1 + test/classes/NormalizationTest.php | 1 + test/classes/Plugins/Auth/AuthenticationCookieTest.php | 1 + test/classes/Plugins/Auth/AuthenticationSignonTest.php | 6 +++++- test/classes/Plugins/Export/ExportHtmlwordTest.php | 1 + test/classes/Plugins/Export/ExportJsonTest.php | 1 + test/classes/Plugins/Export/ExportLatexTest.php | 1 + test/classes/Plugins/Export/ExportOdsTest.php | 1 + test/classes/Plugins/Export/ExportOdtTest.php | 1 + test/classes/Plugins/Export/ExportPdfTest.php | 1 + test/classes/Plugins/Export/ExportPhparrayTest.php | 1 + test/classes/Plugins/Export/ExportSqlTest.php | 1 + test/classes/Plugins/Export/ExportTexytextTest.php | 1 + test/classes/Plugins/Export/ExportXmlTest.php | 1 + test/classes/Plugins/Schema/DiaRelationSchemaTest.php | 1 + test/classes/Plugins/Schema/EpsRelationSchemaTest.php | 1 + test/classes/Plugins/Schema/ExportRelationSchemaTest.php | 1 + test/classes/Plugins/Schema/PdfRelationSchemaTest.php | 1 + test/classes/Plugins/Schema/SvgRelationSchemaTest.php | 1 + test/classes/RelationCleanupTest.php | 1 + test/classes/RelationTest.php | 1 + test/classes/Server/UserGroupsTest.php | 1 + test/classes/Setup/FormProcessingTest.php | 1 + test/classes/SqlQueryFormTest.php | 1 + test/classes/SqlTest.php | 3 +++ test/classes/SystemDatabaseTest.php | 1 + test/classes/TableTest.php | 1 + test/classes/ThemeManagerTest.php | 3 ++- test/classes/ThemeTest.php | 1 + test/classes/TrackerTest.php | 1 + test/classes/TrackingTest.php | 1 + test/classes/TransformationsTest.php | 1 + test/classes/TwoFactorTest.php | 1 + test/classes/UserPreferencesTest.php | 5 +++-- test/classes/UtilTest.php | 1 + 62 files changed, 78 insertions(+), 9 deletions(-) diff --git a/test/classes/CharsetsTest.php b/test/classes/CharsetsTest.php index 96a60b0687..2a996411f9 100644 --- a/test/classes/CharsetsTest.php +++ b/test/classes/CharsetsTest.php @@ -17,6 +17,7 @@ class CharsetsTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + $GLOBALS['server'] = 0; $GLOBALS['cfg']['DBG']['sql'] = false; $GLOBALS['cfg']['Server']['DisableIS'] = false; } diff --git a/test/classes/Config/FormDisplayTest.php b/test/classes/Config/FormDisplayTest.php index fba13be7ac..60135c76e6 100644 --- a/test/classes/Config/FormDisplayTest.php +++ b/test/classes/Config/FormDisplayTest.php @@ -31,9 +31,9 @@ class FormDisplayTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); parent::loadDefaultConfig(); - parent::defineVersionConstants(); $GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath(); parent::setGlobalConfig(); $GLOBALS['server'] = 0; diff --git a/test/classes/Config/FormTest.php b/test/classes/Config/FormTest.php index 8edd6dd660..7085991eac 100644 --- a/test/classes/Config/FormTest.php +++ b/test/classes/Config/FormTest.php @@ -29,9 +29,9 @@ class FormTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); parent::loadDefaultConfig(); - parent::defineVersionConstants(); $GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath(); parent::setGlobalConfig(); $GLOBALS['server'] = 0; diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php index 46fe4d95c7..6fb3125ba6 100644 --- a/test/classes/ConfigTest.php +++ b/test/classes/ConfigTest.php @@ -56,6 +56,7 @@ class ConfigTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); $_SERVER['HTTP_USER_AGENT'] = ''; $this->object = new Config(); diff --git a/test/classes/Controllers/Database/PrivilegesControllerTest.php b/test/classes/Controllers/Database/PrivilegesControllerTest.php index 62c2df157d..df0e89bf75 100644 --- a/test/classes/Controllers/Database/PrivilegesControllerTest.php +++ b/test/classes/Controllers/Database/PrivilegesControllerTest.php @@ -18,6 +18,7 @@ class PrivilegesControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); parent::setLanguage(); } diff --git a/test/classes/Controllers/Database/StructureControllerTest.php b/test/classes/Controllers/Database/StructureControllerTest.php index ec843dcfe1..aab59262c7 100644 --- a/test/classes/Controllers/Database/StructureControllerTest.php +++ b/test/classes/Controllers/Database/StructureControllerTest.php @@ -61,6 +61,7 @@ class StructureControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['server'] = 1; diff --git a/test/classes/Controllers/Server/Status/VariablesControllerTest.php b/test/classes/Controllers/Server/Status/VariablesControllerTest.php index 03578a9506..a0ea73e349 100644 --- a/test/classes/Controllers/Server/Status/VariablesControllerTest.php +++ b/test/classes/Controllers/Server/Status/VariablesControllerTest.php @@ -22,6 +22,7 @@ class VariablesControllerTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setGlobalConfig(); $GLOBALS['PMA_Config']->enableBc(); diff --git a/test/classes/Controllers/Server/VariablesControllerTest.php b/test/classes/Controllers/Server/VariablesControllerTest.php index b19507f66c..ccdd68b4f7 100644 --- a/test/classes/Controllers/Server/VariablesControllerTest.php +++ b/test/classes/Controllers/Server/VariablesControllerTest.php @@ -28,7 +28,9 @@ class VariablesControllerTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setGlobalConfig(); + parent::setLanguage(); $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['text_dir'] = 'ltr'; diff --git a/test/classes/Controllers/Table/FindReplaceControllerTest.php b/test/classes/Controllers/Table/FindReplaceControllerTest.php index e9b0edd4df..8e25adae9e 100644 --- a/test/classes/Controllers/Table/FindReplaceControllerTest.php +++ b/test/classes/Controllers/Table/FindReplaceControllerTest.php @@ -16,6 +16,7 @@ class FindReplaceControllerTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::setLanguage(); parent::setGlobalConfig(); $GLOBALS['PMA_Config']->enableBc(); diff --git a/test/classes/Controllers/Table/IndexesControllerTest.php b/test/classes/Controllers/Table/IndexesControllerTest.php index be9a531069..56e0df1aad 100644 --- a/test/classes/Controllers/Table/IndexesControllerTest.php +++ b/test/classes/Controllers/Table/IndexesControllerTest.php @@ -33,6 +33,7 @@ class IndexesControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); /** diff --git a/test/classes/Controllers/Table/PrivilegesControllerTest.php b/test/classes/Controllers/Table/PrivilegesControllerTest.php index 4546fe58a3..0945745c7a 100644 --- a/test/classes/Controllers/Table/PrivilegesControllerTest.php +++ b/test/classes/Controllers/Table/PrivilegesControllerTest.php @@ -18,7 +18,9 @@ class PrivilegesControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); + parent::setLanguage(); } public function testIndex(): void diff --git a/test/classes/Controllers/Table/RelationControllerTest.php b/test/classes/Controllers/Table/RelationControllerTest.php index a1b02e9e4b..abca6f0cac 100644 --- a/test/classes/Controllers/Table/RelationControllerTest.php +++ b/test/classes/Controllers/Table/RelationControllerTest.php @@ -32,6 +32,7 @@ class RelationControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; diff --git a/test/classes/Controllers/Table/SearchControllerTest.php b/test/classes/Controllers/Table/SearchControllerTest.php index d01916e44a..d17616ce71 100644 --- a/test/classes/Controllers/Table/SearchControllerTest.php +++ b/test/classes/Controllers/Table/SearchControllerTest.php @@ -35,6 +35,7 @@ class SearchControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); /** diff --git a/test/classes/Controllers/Table/StructureControllerTest.php b/test/classes/Controllers/Table/StructureControllerTest.php index 541c0861f4..1539e983e8 100644 --- a/test/classes/Controllers/Table/StructureControllerTest.php +++ b/test/classes/Controllers/Table/StructureControllerTest.php @@ -39,6 +39,7 @@ class StructureControllerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['server'] = 1; diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php index ec172223dd..a16611f0be 100644 --- a/test/classes/CoreTest.php +++ b/test/classes/CoreTest.php @@ -30,6 +30,7 @@ class CoreTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); parent::setLanguage(); parent::loadDefaultConfig(); diff --git a/test/classes/Database/Designer/CommonTest.php b/test/classes/Database/Designer/CommonTest.php index de09222969..3c5f62d912 100644 --- a/test/classes/Database/Designer/CommonTest.php +++ b/test/classes/Database/Designer/CommonTest.php @@ -25,6 +25,7 @@ class CommonTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 1; $_SESSION = [ 'relation' => [ diff --git a/test/classes/Database/DesignerTest.php b/test/classes/Database/DesignerTest.php index f4438301a0..aa825543f1 100644 --- a/test/classes/Database/DesignerTest.php +++ b/test/classes/Database/DesignerTest.php @@ -27,6 +27,8 @@ class DesignerTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); + $GLOBALS['server'] = 1; $GLOBALS['cfg']['ServerDefault'] = 1; $GLOBALS['cfg']['PDFPageSizes'] = [ diff --git a/test/classes/Database/QbeTest.php b/test/classes/Database/QbeTest.php index cd7ed9bb3a..9e5f57f38d 100644 --- a/test/classes/Database/QbeTest.php +++ b/test/classes/Database/QbeTest.php @@ -30,6 +30,7 @@ class QbeTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['db'] = 'pma_test'; $this->object = new Qbe(new Relation($GLOBALS['dbi']), new Template(), $GLOBALS['dbi'], 'pma_test'); diff --git a/test/classes/Database/TriggersTest.php b/test/classes/Database/TriggersTest.php index c39bc61992..e3479850a4 100644 --- a/test/classes/Database/TriggersTest.php +++ b/test/classes/Database/TriggersTest.php @@ -22,7 +22,9 @@ class TriggersTest extends AbstractTestCase { parent::setUp(); parent::setGlobalConfig(); + parent::defineVersionConstants(); parent::setLanguage(); + $GLOBALS['server'] = 0; $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['cfg']['Server']['DisableIS'] = false; $GLOBALS['db'] = 'pma_test'; diff --git a/test/classes/DatabaseInterfaceTest.php b/test/classes/DatabaseInterfaceTest.php index 734e1cd78b..1442cec986 100644 --- a/test/classes/DatabaseInterfaceTest.php +++ b/test/classes/DatabaseInterfaceTest.php @@ -28,6 +28,7 @@ class DatabaseInterfaceTest extends PmaTestCase { parent::setUp(); parent::loadDefaultConfig(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $extension = new DbiDummy(); $this->_dbi = new DatabaseInterface($extension); diff --git a/test/classes/Display/ResultsTest.php b/test/classes/Display/ResultsTest.php index df94fc5a41..9e1811af38 100644 --- a/test/classes/Display/ResultsTest.php +++ b/test/classes/Display/ResultsTest.php @@ -37,13 +37,14 @@ class ResultsTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setLanguage(); + parent::setGlobalConfig(); $GLOBALS['server'] = 0; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; $GLOBALS['PMA_PHP_SELF'] = 'index.php'; $this->object = new DisplayResults('as', '', 0, '', ''); - parent::setGlobalConfig(); $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['cfg']['Server']['DisableIS'] = false; diff --git a/test/classes/ErrorReportTest.php b/test/classes/ErrorReportTest.php index ed3f7b0650..655be3eeb9 100644 --- a/test/classes/ErrorReportTest.php +++ b/test/classes/ErrorReportTest.php @@ -33,6 +33,7 @@ class ErrorReportTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 1; $GLOBALS['cfg']['ServerDefault'] = 1; $GLOBALS['cfg']['ProxyUrl'] = ''; diff --git a/test/classes/FilesTest.php b/test/classes/FilesTest.php index 058069589f..c01103e990 100644 --- a/test/classes/FilesTest.php +++ b/test/classes/FilesTest.php @@ -1,6 +1,6 @@ getPath(); diff --git a/test/classes/Navigation/Nodes/NodeDatabaseTest.php b/test/classes/Navigation/Nodes/NodeDatabaseTest.php index 2c8cda8fed..81844607c9 100644 --- a/test/classes/Navigation/Nodes/NodeDatabaseTest.php +++ b/test/classes/Navigation/Nodes/NodeDatabaseTest.php @@ -21,6 +21,7 @@ class NodeDatabaseTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $GLOBALS['cfg']['DefaultTabDatabase'] = 'structure'; diff --git a/test/classes/NormalizationTest.php b/test/classes/NormalizationTest.php index 7edee20788..1704e2d5fc 100644 --- a/test/classes/NormalizationTest.php +++ b/test/classes/NormalizationTest.php @@ -32,6 +32,7 @@ class NormalizationTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['cfg']['LimitChars'] = 50; $GLOBALS['cfg']['ServerDefault'] = 'PMA_server'; $GLOBALS['cfg']['ShowHint'] = true; diff --git a/test/classes/Plugins/Auth/AuthenticationCookieTest.php b/test/classes/Plugins/Auth/AuthenticationCookieTest.php index 3790ca45d4..0ffd966d34 100644 --- a/test/classes/Plugins/Auth/AuthenticationCookieTest.php +++ b/test/classes/Plugins/Auth/AuthenticationCookieTest.php @@ -38,6 +38,7 @@ class AuthenticationCookieTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setLanguage(); parent::setTheme(); parent::setGlobalConfig(); diff --git a/test/classes/Plugins/Auth/AuthenticationSignonTest.php b/test/classes/Plugins/Auth/AuthenticationSignonTest.php index 7469e30e8a..02f114cbcb 100644 --- a/test/classes/Plugins/Auth/AuthenticationSignonTest.php +++ b/test/classes/Plugins/Auth/AuthenticationSignonTest.php @@ -31,6 +31,8 @@ class AuthenticationSignonTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); + parent::setLanguage(); parent::setGlobalConfig(); $GLOBALS['PMA_Config']->enableBc(); $GLOBALS['server'] = 0; @@ -157,7 +159,9 @@ class AuthenticationSignonTest extends PmaTestCase */ public function testAuthCheckToken() { - $_SESSION = []; + $_SESSION = [ + ' PMA_token ' => 'eefefef', + ]; $this->mockResponse('Location: https://example.com/SignonURL'); $GLOBALS['cfg']['Server']['SignonURL'] = 'https://example.com/SignonURL'; diff --git a/test/classes/Plugins/Export/ExportHtmlwordTest.php b/test/classes/Plugins/Export/ExportHtmlwordTest.php index 6a1b3edbba..02b4141d78 100644 --- a/test/classes/Plugins/Export/ExportHtmlwordTest.php +++ b/test/classes/Plugins/Export/ExportHtmlwordTest.php @@ -38,6 +38,7 @@ class ExportHtmlwordTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $this->object = new ExportHtmlword(); diff --git a/test/classes/Plugins/Export/ExportJsonTest.php b/test/classes/Plugins/Export/ExportJsonTest.php index a2d4a2ce4b..de16a034b5 100644 --- a/test/classes/Plugins/Export/ExportJsonTest.php +++ b/test/classes/Plugins/Export/ExportJsonTest.php @@ -33,6 +33,7 @@ class ExportJsonTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; $GLOBALS['output_charset_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportLatexTest.php b/test/classes/Plugins/Export/ExportLatexTest.php index 27e7a32705..b42eb96605 100644 --- a/test/classes/Plugins/Export/ExportLatexTest.php +++ b/test/classes/Plugins/Export/ExportLatexTest.php @@ -37,6 +37,7 @@ class ExportLatexTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportOdsTest.php b/test/classes/Plugins/Export/ExportOdsTest.php index d9771009a6..a0c220e5cd 100644 --- a/test/classes/Plugins/Export/ExportOdsTest.php +++ b/test/classes/Plugins/Export/ExportOdsTest.php @@ -35,6 +35,7 @@ class ExportOdsTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; $GLOBALS['output_charset_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportOdtTest.php b/test/classes/Plugins/Export/ExportOdtTest.php index c464550fff..9752787d00 100644 --- a/test/classes/Plugins/Export/ExportOdtTest.php +++ b/test/classes/Plugins/Export/ExportOdtTest.php @@ -36,6 +36,7 @@ class ExportOdtTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportPdfTest.php b/test/classes/Plugins/Export/ExportPdfTest.php index e0cba6e1ab..af14472ef3 100644 --- a/test/classes/Plugins/Export/ExportPdfTest.php +++ b/test/classes/Plugins/Export/ExportPdfTest.php @@ -33,6 +33,7 @@ class ExportPdfTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; $GLOBALS['output_charset_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportPhparrayTest.php b/test/classes/Plugins/Export/ExportPhparrayTest.php index 134133fa22..9eb968bdd4 100644 --- a/test/classes/Plugins/Export/ExportPhparrayTest.php +++ b/test/classes/Plugins/Export/ExportPhparrayTest.php @@ -34,6 +34,7 @@ class ExportPhparrayTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; $GLOBALS['output_charset_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportSqlTest.php b/test/classes/Plugins/Export/ExportSqlTest.php index 35036615cf..7d70815b45 100644 --- a/test/classes/Plugins/Export/ExportSqlTest.php +++ b/test/classes/Plugins/Export/ExportSqlTest.php @@ -42,6 +42,7 @@ class ExportSqlTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $GLOBALS['db'] = 'db'; diff --git a/test/classes/Plugins/Export/ExportTexytextTest.php b/test/classes/Plugins/Export/ExportTexytextTest.php index 41e06548e2..93d284ba45 100644 --- a/test/classes/Plugins/Export/ExportTexytextTest.php +++ b/test/classes/Plugins/Export/ExportTexytextTest.php @@ -37,6 +37,7 @@ class ExportTexytextTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; diff --git a/test/classes/Plugins/Export/ExportXmlTest.php b/test/classes/Plugins/Export/ExportXmlTest.php index a993649949..d78fab0d8a 100644 --- a/test/classes/Plugins/Export/ExportXmlTest.php +++ b/test/classes/Plugins/Export/ExportXmlTest.php @@ -36,6 +36,7 @@ class ExportXmlTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; $GLOBALS['output_kanji_conversion'] = false; $GLOBALS['buffer_needed'] = false; diff --git a/test/classes/Plugins/Schema/DiaRelationSchemaTest.php b/test/classes/Plugins/Schema/DiaRelationSchemaTest.php index 9fe86a26f4..55b1106bdd 100644 --- a/test/classes/Plugins/Schema/DiaRelationSchemaTest.php +++ b/test/classes/Plugins/Schema/DiaRelationSchemaTest.php @@ -28,6 +28,7 @@ class DiaRelationSchemaTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $_REQUEST['page_number'] = 33; $_REQUEST['dia_show_color'] = true; $_REQUEST['dia_show_keys'] = true; diff --git a/test/classes/Plugins/Schema/EpsRelationSchemaTest.php b/test/classes/Plugins/Schema/EpsRelationSchemaTest.php index 98348e1ddc..0ad5923177 100644 --- a/test/classes/Plugins/Schema/EpsRelationSchemaTest.php +++ b/test/classes/Plugins/Schema/EpsRelationSchemaTest.php @@ -28,6 +28,7 @@ class EpsRelationSchemaTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $_REQUEST['page_number'] = 33; $_REQUEST['eps_show_color'] = true; $_REQUEST['eps_show_keys'] = true; diff --git a/test/classes/Plugins/Schema/ExportRelationSchemaTest.php b/test/classes/Plugins/Schema/ExportRelationSchemaTest.php index cce71a555a..c0217fb7f6 100644 --- a/test/classes/Plugins/Schema/ExportRelationSchemaTest.php +++ b/test/classes/Plugins/Schema/ExportRelationSchemaTest.php @@ -26,6 +26,7 @@ class ExportRelationSchemaTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $_REQUEST['page_number'] = 33; $this->object = new ExportRelationSchema('information_schema', null); } diff --git a/test/classes/Plugins/Schema/PdfRelationSchemaTest.php b/test/classes/Plugins/Schema/PdfRelationSchemaTest.php index cdf47e8665..65ec531c81 100644 --- a/test/classes/Plugins/Schema/PdfRelationSchemaTest.php +++ b/test/classes/Plugins/Schema/PdfRelationSchemaTest.php @@ -28,6 +28,7 @@ class PdfRelationSchemaTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $_REQUEST['page_number'] = 33; $_REQUEST['pdf_show_grid'] = true; $_REQUEST['pdf_show_color'] = true; diff --git a/test/classes/Plugins/Schema/SvgRelationSchemaTest.php b/test/classes/Plugins/Schema/SvgRelationSchemaTest.php index 9c9b5adba8..b61f000044 100644 --- a/test/classes/Plugins/Schema/SvgRelationSchemaTest.php +++ b/test/classes/Plugins/Schema/SvgRelationSchemaTest.php @@ -28,6 +28,7 @@ class SvgRelationSchemaTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $_REQUEST['page_number'] = 33; $_REQUEST['svg_show_color'] = true; $_REQUEST['svg_show_keys'] = true; diff --git a/test/classes/RelationCleanupTest.php b/test/classes/RelationCleanupTest.php index 84313a3b56..b4a85703d9 100644 --- a/test/classes/RelationCleanupTest.php +++ b/test/classes/RelationCleanupTest.php @@ -31,6 +31,7 @@ class RelationCleanupTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 1; $_SESSION['relation'] = []; $_SESSION['relation'][$GLOBALS['server']] = [ diff --git a/test/classes/RelationTest.php b/test/classes/RelationTest.php index 67c39d9c3c..78a4e9b432 100644 --- a/test/classes/RelationTest.php +++ b/test/classes/RelationTest.php @@ -29,6 +29,7 @@ class RelationTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; diff --git a/test/classes/Server/UserGroupsTest.php b/test/classes/Server/UserGroupsTest.php index 72ed5a60c2..5253b58cf4 100644 --- a/test/classes/Server/UserGroupsTest.php +++ b/test/classes/Server/UserGroupsTest.php @@ -23,6 +23,7 @@ class UserGroupsTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['cfg']['ServerDefault'] = 1; $GLOBALS['cfg']['ActionLinksMode'] = 'both'; diff --git a/test/classes/Setup/FormProcessingTest.php b/test/classes/Setup/FormProcessingTest.php index b52c6cfc3e..b5175d47f6 100644 --- a/test/classes/Setup/FormProcessingTest.php +++ b/test/classes/Setup/FormProcessingTest.php @@ -23,6 +23,7 @@ class FormProcessingTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); parent::setLanguage(); $GLOBALS['server'] = 1; diff --git a/test/classes/SqlQueryFormTest.php b/test/classes/SqlQueryFormTest.php index 229a79349e..0be08a6c3f 100644 --- a/test/classes/SqlQueryFormTest.php +++ b/test/classes/SqlQueryFormTest.php @@ -32,6 +32,7 @@ class SqlQueryFormTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setLanguage(); $this->sqlQueryForm = new SqlQueryForm(new Template()); diff --git a/test/classes/SqlTest.php b/test/classes/SqlTest.php index 6de86885ef..322a72e50e 100644 --- a/test/classes/SqlTest.php +++ b/test/classes/SqlTest.php @@ -25,6 +25,9 @@ class SqlTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); + parent::setLanguage(); + parent::loadDefaultConfig(); $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; diff --git a/test/classes/SystemDatabaseTest.php b/test/classes/SystemDatabaseTest.php index f2013de00b..64377e96c6 100644 --- a/test/classes/SystemDatabaseTest.php +++ b/test/classes/SystemDatabaseTest.php @@ -29,6 +29,7 @@ class SystemDatabaseTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); /** * SET these to avoid undefine d index error */ diff --git a/test/classes/TableTest.php b/test/classes/TableTest.php index 81bb4809db..9f1564b1af 100644 --- a/test/classes/TableTest.php +++ b/test/classes/TableTest.php @@ -25,6 +25,7 @@ class TableTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::loadDefaultConfig(); /** diff --git a/test/classes/ThemeManagerTest.php b/test/classes/ThemeManagerTest.php index 9910fae01f..343ffcb733 100644 --- a/test/classes/ThemeManagerTest.php +++ b/test/classes/ThemeManagerTest.php @@ -21,11 +21,12 @@ class ThemeManagerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); + parent::setGlobalConfig(); $GLOBALS['cfg']['ThemePerServer'] = false; $GLOBALS['cfg']['ThemeDefault'] = 'pmahomme'; $GLOBALS['cfg']['ServerDefault'] = 0; $GLOBALS['server'] = 99; - parent::setGlobalConfig(); $dbi = $this->getMockBuilder(DatabaseInterface::class) ->disableOriginalConstructor() diff --git a/test/classes/ThemeTest.php b/test/classes/ThemeTest.php index 35b4bcd9ca..eb674dbfbb 100644 --- a/test/classes/ThemeTest.php +++ b/test/classes/ThemeTest.php @@ -28,6 +28,7 @@ class ThemeTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setTheme(); $this->object = new Theme(); $this->backup = $GLOBALS['PMA_Theme']; diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php index 803a69d95f..00bf2fc78f 100644 --- a/test/classes/TrackerTest.php +++ b/test/classes/TrackerTest.php @@ -26,6 +26,7 @@ class TrackerTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); /** * SET these to avoid undefined index error */ diff --git a/test/classes/TrackingTest.php b/test/classes/TrackingTest.php index dd2b09bd28..6287d87dd1 100644 --- a/test/classes/TrackingTest.php +++ b/test/classes/TrackingTest.php @@ -32,6 +32,7 @@ class TrackingTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); /** * SET these to avoid undefined index error */ diff --git a/test/classes/TransformationsTest.php b/test/classes/TransformationsTest.php index ecd0aa15a8..7d3522a559 100644 --- a/test/classes/TransformationsTest.php +++ b/test/classes/TransformationsTest.php @@ -24,6 +24,7 @@ class TransformationsTest extends AbstractTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['table'] = 'table'; $GLOBALS['db'] = 'db'; $GLOBALS['cfg'] = [ diff --git a/test/classes/TwoFactorTest.php b/test/classes/TwoFactorTest.php index 28bcd0cc17..24a8d1a6ea 100644 --- a/test/classes/TwoFactorTest.php +++ b/test/classes/TwoFactorTest.php @@ -21,6 +21,7 @@ class TwoFactorTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; diff --git a/test/classes/UserPreferencesTest.php b/test/classes/UserPreferencesTest.php index def39f9952..b9832b6a00 100644 --- a/test/classes/UserPreferencesTest.php +++ b/test/classes/UserPreferencesTest.php @@ -28,9 +28,10 @@ class UserPreferencesTest extends PmaTestCase protected function setUp(): void { parent::setUp(); - global $cfg; - include ROOT_PATH . 'libraries/config.default.php'; + parent::loadDefaultConfig(); + parent::defineVersionConstants(); $GLOBALS['server'] = 0; + $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['PMA_PHP_SELF'] = '/phpmyadmin/'; $cfg['Server']['DisableIS'] = false; diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php index b387a6e379..edfa7bc3fe 100644 --- a/test/classes/UtilTest.php +++ b/test/classes/UtilTest.php @@ -36,6 +36,7 @@ class UtilTest extends PmaTestCase protected function setUp(): void { parent::setUp(); + parent::defineVersionConstants(); parent::setLanguage(); parent::setTheme(); parent::loadDefaultConfig();