Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2022-07-14 08:13:23 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-07-14 08:21:45 +0300
commit346923e20a1e00adf98bf1e9164118dc05ad22ba (patch)
tree415bde6d66033e8f4b1d12525f58c34be67c6224 /test
parent615782a72736a29603a29a6111d0eaabd38340cd (diff)
Set dbi only when the test needs it
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17637 Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test')
-rw-r--r--test/classes/AbstractTestCase.php1
-rw-r--r--test/classes/Advisory/AdvisorTest.php1
-rw-r--r--test/classes/CheckUserPrivilegesTest.php1
-rw-r--r--test/classes/Config/PageSettingsTest.php1
-rw-r--r--test/classes/ConfigStorage/UserGroupsTest.php1
-rw-r--r--test/classes/ConfigTest.php1
-rw-r--r--test/classes/ConsoleTest.php1
-rw-r--r--test/classes/Controllers/AbstractControllerTest.php6
-rw-r--r--test/classes/Controllers/CheckRelationsControllerTest.php1
-rw-r--r--test/classes/Controllers/LintControllerTest.php6
-rw-r--r--test/classes/Controllers/Server/Databases/DestroyControllerTest.php6
-rw-r--r--test/classes/Controllers/Server/Privileges/AccountLockControllerTest.php1
-rw-r--r--test/classes/Controllers/Server/Privileges/AccountUnlockControllerTest.php1
-rw-r--r--test/classes/Controllers/Server/Status/AdvisorControllerTest.php1
-rw-r--r--test/classes/Controllers/Server/Status/Monitor/QueryAnalyzerControllerTest.php6
-rw-r--r--test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php1
-rw-r--r--test/classes/Controllers/Table/ChangeRowsControllerTest.php1
-rw-r--r--test/classes/Controllers/Table/DropColumnConfirmationControllerTest.php6
-rw-r--r--test/classes/Controllers/Table/DropColumnControllerTest.php6
-rw-r--r--test/classes/Controllers/Table/ExportControllerTest.php6
-rw-r--r--test/classes/Controllers/Table/ExportRowsControllerTest.php1
-rw-r--r--test/classes/Controllers/Table/PrivilegesControllerTest.php1
-rw-r--r--test/classes/Controllers/Table/Structure/SaveControllerTest.php6
-rw-r--r--test/classes/Controllers/ThemeSetControllerTest.php6
-rw-r--r--test/classes/Controllers/Transformation/OverviewControllerTest.php1
-rw-r--r--test/classes/Controllers/VersionCheckControllerTest.php6
-rw-r--r--test/classes/CoreTest.php1
-rw-r--r--test/classes/CreateAddFieldTest.php1
-rw-r--r--test/classes/Database/DesignerTest.php1
-rw-r--r--test/classes/Database/EventsTest.php1
-rw-r--r--test/classes/Database/QbeTest.php1
-rw-r--r--test/classes/Database/RoutinesTest.php1
-rw-r--r--test/classes/Database/TriggersTest.php1
-rw-r--r--test/classes/DatabaseInterfaceTest.php6
-rw-r--r--test/classes/Engines/BdbTest.php1
-rw-r--r--test/classes/Engines/InnodbTest.php1
-rw-r--r--test/classes/Export/OptionsTest.php1
-rw-r--r--test/classes/ExportTest.php1
-rw-r--r--test/classes/FooterTest.php1
-rw-r--r--test/classes/HeaderTest.php1
-rw-r--r--test/classes/ImportTest.php1
-rw-r--r--test/classes/ListDatabaseTest.php1
-rw-r--r--test/classes/Navigation/NavigationTest.php1
-rw-r--r--test/classes/Navigation/NavigationTreeTest.php1
-rw-r--r--test/classes/Navigation/NodeFactoryTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeColumnContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeColumnTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeDatabaseChildTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeDatabaseTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeEventContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeEventTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeFunctionContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeFunctionTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeIndexContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeIndexTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeProcedureContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeProcedureTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeTableContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeTableTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeTriggerContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeTriggerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeViewContainerTest.php1
-rw-r--r--test/classes/Navigation/Nodes/NodeViewTest.php1
-rw-r--r--test/classes/ParseAnalyzeTest.php6
-rw-r--r--test/classes/Partitioning/PartitionTest.php6
-rw-r--r--test/classes/Plugins/Auth/AuthenticationConfigTest.php1
-rw-r--r--test/classes/Plugins/Auth/AuthenticationCookieTest.php1
-rw-r--r--test/classes/Plugins/Auth/AuthenticationHttpTest.php1
-rw-r--r--test/classes/Plugins/Auth/AuthenticationSignonTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportCodegenTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportCsvTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportExcelTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportJsonTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportLatexTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportMediawikiTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportOdsTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportPdfTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportPhparrayTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportSqlTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportXmlTest.php1
-rw-r--r--test/classes/Plugins/Export/ExportYamlTest.php1
-rw-r--r--test/classes/Plugins/Import/ImportLdiTest.php1
-rw-r--r--test/classes/Plugins/Import/ImportMediawikiTest.php1
-rw-r--r--test/classes/Plugins/Import/ImportOdsTest.php1
-rw-r--r--test/classes/Plugins/Import/ImportSqlTest.php1
-rw-r--r--test/classes/Plugins/Import/ImportXmlTest.php1
-rw-r--r--test/classes/Plugins/Schema/DiaRelationSchemaTest.php1
-rw-r--r--test/classes/Plugins/Schema/EpsRelationSchemaTest.php1
-rw-r--r--test/classes/Plugins/Schema/ExportRelationSchemaTest.php1
-rw-r--r--test/classes/Plugins/Schema/PdfRelationSchemaTest.php1
-rw-r--r--test/classes/Plugins/Schema/SvgRelationSchemaTest.php1
-rw-r--r--test/classes/PluginsTest.php1
-rw-r--r--test/classes/ProfilingTest.php1
-rw-r--r--test/classes/ReplicationGuiTest.php1
-rw-r--r--test/classes/ResponseTest.php1
-rw-r--r--test/classes/Server/PluginsTest.php6
-rw-r--r--test/classes/SystemDatabaseTest.php1
-rw-r--r--test/classes/Table/SearchTest.php1
-rw-r--r--test/classes/TrackerTest.php1
-rw-r--r--test/classes/TrackingTest.php1
-rw-r--r--test/classes/TransformationsTest.php1
-rw-r--r--test/classes/TypesTest.php1
-rw-r--r--test/classes/UserPasswordTest.php1
-rw-r--r--test/classes/UserPreferencesTest.php1
-rw-r--r--test/classes/UtilTest.php1
-rw-r--r--test/classes/Utils/ForeignKeyTest.php6
-rw-r--r--test/classes/Utils/GisTest.php6
-rw-r--r--test/classes/Utils/HttpRequestTest.php1
109 files changed, 188 insertions, 1 deletions
diff --git a/test/classes/AbstractTestCase.php b/test/classes/AbstractTestCase.php
index d56e07972e..c880cc28d9 100644
--- a/test/classes/AbstractTestCase.php
+++ b/test/classes/AbstractTestCase.php
@@ -83,7 +83,6 @@ abstract class AbstractTestCase extends TestCase
// Config before DBI
$this->setGlobalConfig();
$this->loadContainerBuilder();
- $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->setTheme();
Cache::purge();
}
diff --git a/test/classes/Advisory/AdvisorTest.php b/test/classes/Advisory/AdvisorTest.php
index 2550c6816c..468f425c51 100644
--- a/test/classes/Advisory/AdvisorTest.php
+++ b/test/classes/Advisory/AdvisorTest.php
@@ -17,6 +17,7 @@ class AdvisorTest extends AbstractTestCase
{
parent::setUp();
parent::setGlobalConfig();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
}
diff --git a/test/classes/CheckUserPrivilegesTest.php b/test/classes/CheckUserPrivilegesTest.php
index f258940905..813866e431 100644
--- a/test/classes/CheckUserPrivilegesTest.php
+++ b/test/classes/CheckUserPrivilegesTest.php
@@ -20,6 +20,7 @@ class CheckUserPrivilegesTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['col_priv'] = false;
diff --git a/test/classes/Config/PageSettingsTest.php b/test/classes/Config/PageSettingsTest.php
index 97eef18ab2..b68adc4ed6 100644
--- a/test/classes/Config/PageSettingsTest.php
+++ b/test/classes/Config/PageSettingsTest.php
@@ -21,6 +21,7 @@ class PageSettingsTest extends AbstractTestCase
parent::setLanguage();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = '';
diff --git a/test/classes/ConfigStorage/UserGroupsTest.php b/test/classes/ConfigStorage/UserGroupsTest.php
index 7f293c3683..1c958506bf 100644
--- a/test/classes/ConfigStorage/UserGroupsTest.php
+++ b/test/classes/ConfigStorage/UserGroupsTest.php
@@ -30,6 +30,7 @@ class UserGroupsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php
index 68864504b5..dca54db8db 100644
--- a/test/classes/ConfigTest.php
+++ b/test/classes/ConfigTest.php
@@ -54,6 +54,7 @@ class ConfigTest extends AbstractTestCase
{
parent::setUp();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_SERVER['HTTP_USER_AGENT'] = '';
$this->object = new Config();
$GLOBALS['server'] = 0;
diff --git a/test/classes/ConsoleTest.php b/test/classes/ConsoleTest.php
index 23ebd5ec3a..243f00846b 100644
--- a/test/classes/ConsoleTest.php
+++ b/test/classes/ConsoleTest.php
@@ -13,6 +13,7 @@ class ConsoleTest extends AbstractTestCase
{
public function testGetScripts(): void
{
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$console = new Console();
$this->assertEquals(['console.js'], $console->getScripts());
}
diff --git a/test/classes/Controllers/AbstractControllerTest.php b/test/classes/Controllers/AbstractControllerTest.php
index daa1908266..1ac2d3eade 100644
--- a/test/classes/Controllers/AbstractControllerTest.php
+++ b/test/classes/Controllers/AbstractControllerTest.php
@@ -17,6 +17,12 @@ use PhpMyAdmin\Tests\Stubs\ResponseRenderer;
*/
class AbstractControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testCheckParametersWithMissingParameters(): void
{
$_REQUEST = [];
diff --git a/test/classes/Controllers/CheckRelationsControllerTest.php b/test/classes/Controllers/CheckRelationsControllerTest.php
index 72085e2ba0..46cd7ee3e6 100644
--- a/test/classes/Controllers/CheckRelationsControllerTest.php
+++ b/test/classes/Controllers/CheckRelationsControllerTest.php
@@ -27,6 +27,7 @@ class CheckRelationsControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->dummyDbi = $this->createDbiDummy();
$this->dbi = $this->createDatabaseInterface($this->dummyDbi);
$GLOBALS['dbi'] = $this->dbi;
diff --git a/test/classes/Controllers/LintControllerTest.php b/test/classes/Controllers/LintControllerTest.php
index e87f55bd26..9df89bd1a9 100644
--- a/test/classes/Controllers/LintControllerTest.php
+++ b/test/classes/Controllers/LintControllerTest.php
@@ -16,6 +16,12 @@ use function json_encode;
*/
class LintControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testWithoutParams(): void
{
$_POST = [];
diff --git a/test/classes/Controllers/Server/Databases/DestroyControllerTest.php b/test/classes/Controllers/Server/Databases/DestroyControllerTest.php
index 33fdf0bbc0..07ac828a20 100644
--- a/test/classes/Controllers/Server/Databases/DestroyControllerTest.php
+++ b/test/classes/Controllers/Server/Databases/DestroyControllerTest.php
@@ -20,6 +20,12 @@ use function __;
*/
class DestroyControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testDropDatabases(): void
{
$GLOBALS['server'] = 1;
diff --git a/test/classes/Controllers/Server/Privileges/AccountLockControllerTest.php b/test/classes/Controllers/Server/Privileges/AccountLockControllerTest.php
index aeaccc83df..83e6e92cad 100644
--- a/test/classes/Controllers/Server/Privileges/AccountLockControllerTest.php
+++ b/test/classes/Controllers/Server/Privileges/AccountLockControllerTest.php
@@ -34,6 +34,7 @@ class AccountLockControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['text_dir'] = 'ltr';
diff --git a/test/classes/Controllers/Server/Privileges/AccountUnlockControllerTest.php b/test/classes/Controllers/Server/Privileges/AccountUnlockControllerTest.php
index 036ac87d0b..0d92e31887 100644
--- a/test/classes/Controllers/Server/Privileges/AccountUnlockControllerTest.php
+++ b/test/classes/Controllers/Server/Privileges/AccountUnlockControllerTest.php
@@ -34,6 +34,7 @@ class AccountUnlockControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['text_dir'] = 'ltr';
diff --git a/test/classes/Controllers/Server/Status/AdvisorControllerTest.php b/test/classes/Controllers/Server/Status/AdvisorControllerTest.php
index 86f7213dd5..8549b6ed88 100644
--- a/test/classes/Controllers/Server/Status/AdvisorControllerTest.php
+++ b/test/classes/Controllers/Server/Status/AdvisorControllerTest.php
@@ -32,6 +32,7 @@ class AdvisorControllerTest extends AbstractTestCase
$GLOBALS['text_dir'] = 'ltr';
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
diff --git a/test/classes/Controllers/Server/Status/Monitor/QueryAnalyzerControllerTest.php b/test/classes/Controllers/Server/Status/Monitor/QueryAnalyzerControllerTest.php
index 4c1dd9f407..683b3662bd 100644
--- a/test/classes/Controllers/Server/Status/Monitor/QueryAnalyzerControllerTest.php
+++ b/test/classes/Controllers/Server/Status/Monitor/QueryAnalyzerControllerTest.php
@@ -18,6 +18,12 @@ use PhpMyAdmin\Utils\SessionCache;
*/
class QueryAnalyzerControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testQueryAnalyzer(): void
{
$GLOBALS['cfg']['Server']['DisableIS'] = false;
diff --git a/test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php b/test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php
index f4ac71e9f9..1d26428d20 100644
--- a/test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php
+++ b/test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php
@@ -26,6 +26,7 @@ class RefreshControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['text_dir'] = 'ltr';
parent::setGlobalConfig();
parent::setTheme();
diff --git a/test/classes/Controllers/Table/ChangeRowsControllerTest.php b/test/classes/Controllers/Table/ChangeRowsControllerTest.php
index 862c3ce7ed..ec7a501470 100644
--- a/test/classes/Controllers/Table/ChangeRowsControllerTest.php
+++ b/test/classes/Controllers/Table/ChangeRowsControllerTest.php
@@ -19,6 +19,7 @@ class ChangeRowsControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 2;
$GLOBALS['active_page'] = null;
$GLOBALS['where_clause'] = null;
diff --git a/test/classes/Controllers/Table/DropColumnConfirmationControllerTest.php b/test/classes/Controllers/Table/DropColumnConfirmationControllerTest.php
index ed215770b3..4cd1f2e5ef 100644
--- a/test/classes/Controllers/Table/DropColumnConfirmationControllerTest.php
+++ b/test/classes/Controllers/Table/DropColumnConfirmationControllerTest.php
@@ -15,6 +15,12 @@ use PhpMyAdmin\Tests\Stubs\ResponseRenderer;
*/
class DropColumnConfirmationControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testWithValidParameters(): void
{
$request = $this->createStub(ServerRequest::class);
diff --git a/test/classes/Controllers/Table/DropColumnControllerTest.php b/test/classes/Controllers/Table/DropColumnControllerTest.php
index 939b792712..30167965ec 100644
--- a/test/classes/Controllers/Table/DropColumnControllerTest.php
+++ b/test/classes/Controllers/Table/DropColumnControllerTest.php
@@ -17,6 +17,12 @@ use PhpMyAdmin\Tests\Stubs\ResponseRenderer;
*/
class DropColumnControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testDropColumnController(): void
{
$GLOBALS['db'] = 'test_db';
diff --git a/test/classes/Controllers/Table/ExportControllerTest.php b/test/classes/Controllers/Table/ExportControllerTest.php
index e2e8558fa4..138ad396a8 100644
--- a/test/classes/Controllers/Table/ExportControllerTest.php
+++ b/test/classes/Controllers/Table/ExportControllerTest.php
@@ -20,6 +20,12 @@ use PhpMyAdmin\Tests\Stubs\ResponseRenderer;
*/
class ExportControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testExportController(): void
{
parent::loadDbiIntoContainerBuilder();
diff --git a/test/classes/Controllers/Table/ExportRowsControllerTest.php b/test/classes/Controllers/Table/ExportRowsControllerTest.php
index 78748d3cb4..ee6e9726da 100644
--- a/test/classes/Controllers/Table/ExportRowsControllerTest.php
+++ b/test/classes/Controllers/Table/ExportRowsControllerTest.php
@@ -18,6 +18,7 @@ class ExportRowsControllerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 2;
$GLOBALS['active_page'] = null;
$GLOBALS['single_table'] = null;
diff --git a/test/classes/Controllers/Table/PrivilegesControllerTest.php b/test/classes/Controllers/Table/PrivilegesControllerTest.php
index 641b3e3c53..e9afa08345 100644
--- a/test/classes/Controllers/Table/PrivilegesControllerTest.php
+++ b/test/classes/Controllers/Table/PrivilegesControllerTest.php
@@ -27,6 +27,7 @@ class PrivilegesControllerTest extends AbstractTestCase
parent::setUp();
parent::setLanguage();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
}
public function testIndex(): void
diff --git a/test/classes/Controllers/Table/Structure/SaveControllerTest.php b/test/classes/Controllers/Table/Structure/SaveControllerTest.php
index da2e80a4d7..a61a2fc971 100644
--- a/test/classes/Controllers/Table/Structure/SaveControllerTest.php
+++ b/test/classes/Controllers/Table/Structure/SaveControllerTest.php
@@ -19,6 +19,12 @@ use ReflectionClass;
*/
class SaveControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testSaveController(): void
{
$_POST = [
diff --git a/test/classes/Controllers/ThemeSetControllerTest.php b/test/classes/Controllers/ThemeSetControllerTest.php
index edeef16b80..1cfca6e4a7 100644
--- a/test/classes/Controllers/ThemeSetControllerTest.php
+++ b/test/classes/Controllers/ThemeSetControllerTest.php
@@ -17,6 +17,12 @@ use PhpMyAdmin\UserPreferences;
*/
class ThemeSetControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
diff --git a/test/classes/Controllers/Transformation/OverviewControllerTest.php b/test/classes/Controllers/Transformation/OverviewControllerTest.php
index d54c44b40d..56b9a60366 100644
--- a/test/classes/Controllers/Transformation/OverviewControllerTest.php
+++ b/test/classes/Controllers/Transformation/OverviewControllerTest.php
@@ -25,6 +25,7 @@ class OverviewControllerTest extends AbstractTestCase
parent::setUp();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['server'] = 1;
diff --git a/test/classes/Controllers/VersionCheckControllerTest.php b/test/classes/Controllers/VersionCheckControllerTest.php
index d2c37a69cc..b92eb02448 100644
--- a/test/classes/Controllers/VersionCheckControllerTest.php
+++ b/test/classes/Controllers/VersionCheckControllerTest.php
@@ -15,6 +15,12 @@ use PhpMyAdmin\VersionInformation;
*/
class VersionCheckControllerTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testWithLatestCompatibleVersion(): void
{
$_GET = [];
diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php
index b76c7d3d1c..e0bcd4531e 100644
--- a/test/classes/CoreTest.php
+++ b/test/classes/CoreTest.php
@@ -37,6 +37,7 @@ class CoreTest extends AbstractNetworkTestCase
parent::setUp();
parent::setTheme();
parent::setLanguage();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = '';
diff --git a/test/classes/CreateAddFieldTest.php b/test/classes/CreateAddFieldTest.php
index 59f62d6348..3616ce5aff 100644
--- a/test/classes/CreateAddFieldTest.php
+++ b/test/classes/CreateAddFieldTest.php
@@ -22,6 +22,7 @@ class CreateAddFieldTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->createAddField = new CreateAddField($GLOBALS['dbi']);
}
diff --git a/test/classes/Database/DesignerTest.php b/test/classes/Database/DesignerTest.php
index 68d873d471..63df623eb5 100644
--- a/test/classes/Database/DesignerTest.php
+++ b/test/classes/Database/DesignerTest.php
@@ -27,6 +27,7 @@ class DesignerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['ServerDefault'] = 1;
diff --git a/test/classes/Database/EventsTest.php b/test/classes/Database/EventsTest.php
index cd3742bf68..0d69e8d112 100644
--- a/test/classes/Database/EventsTest.php
+++ b/test/classes/Database/EventsTest.php
@@ -27,6 +27,7 @@ class EventsTest extends AbstractTestCase
parent::setGlobalConfig();
parent::setLanguage();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
diff --git a/test/classes/Database/QbeTest.php b/test/classes/Database/QbeTest.php
index 3bdba94650..f44257155e 100644
--- a/test/classes/Database/QbeTest.php
+++ b/test/classes/Database/QbeTest.php
@@ -25,6 +25,7 @@ class QbeTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$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/RoutinesTest.php b/test/classes/Database/RoutinesTest.php
index dfa9f152e7..9b166c7837 100644
--- a/test/classes/Database/RoutinesTest.php
+++ b/test/classes/Database/RoutinesTest.php
@@ -28,6 +28,7 @@ class RoutinesTest extends AbstractTestCase
parent::setGlobalConfig();
parent::setLanguage();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['server'] = 0;
diff --git a/test/classes/Database/TriggersTest.php b/test/classes/Database/TriggersTest.php
index 75f991eb92..89cfd7075c 100644
--- a/test/classes/Database/TriggersTest.php
+++ b/test/classes/Database/TriggersTest.php
@@ -26,6 +26,7 @@ class TriggersTest extends AbstractTestCase
parent::setGlobalConfig();
parent::setLanguage();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['db'] = 'pma_test';
diff --git a/test/classes/DatabaseInterfaceTest.php b/test/classes/DatabaseInterfaceTest.php
index 4c2583e7ad..d43f3967ad 100644
--- a/test/classes/DatabaseInterfaceTest.php
+++ b/test/classes/DatabaseInterfaceTest.php
@@ -18,6 +18,12 @@ use stdClass;
*/
class DatabaseInterfaceTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
/**
* Tests for DBI::getCurrentUser() method.
*
diff --git a/test/classes/Engines/BdbTest.php b/test/classes/Engines/BdbTest.php
index 1be43f6603..9d43f4ac26 100644
--- a/test/classes/Engines/BdbTest.php
+++ b/test/classes/Engines/BdbTest.php
@@ -24,6 +24,7 @@ class BdbTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$this->object = new Bdb('bdb');
}
diff --git a/test/classes/Engines/InnodbTest.php b/test/classes/Engines/InnodbTest.php
index 268ef2e322..62d0597bf1 100644
--- a/test/classes/Engines/InnodbTest.php
+++ b/test/classes/Engines/InnodbTest.php
@@ -24,6 +24,7 @@ class InnodbTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$this->object = new Innodb('innodb');
}
diff --git a/test/classes/Export/OptionsTest.php b/test/classes/Export/OptionsTest.php
index 144adb4bf2..42ccd9da87 100644
--- a/test/classes/Export/OptionsTest.php
+++ b/test/classes/Export/OptionsTest.php
@@ -27,6 +27,7 @@ class OptionsTest extends AbstractTestCase
parent::setUp();
parent::setLanguage();
parent::setGlobalConfig();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
parent::loadDbiIntoContainerBuilder();
$GLOBALS['cfg']['Server']['host'] = 'localhost';
diff --git a/test/classes/ExportTest.php b/test/classes/ExportTest.php
index 91c11dfa32..45ad69ef5b 100644
--- a/test/classes/ExportTest.php
+++ b/test/classes/ExportTest.php
@@ -24,6 +24,7 @@ class ExportTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->export = new Export($GLOBALS['dbi']);
}
diff --git a/test/classes/FooterTest.php b/test/classes/FooterTest.php
index 787d4b3919..074495acad 100644
--- a/test/classes/FooterTest.php
+++ b/test/classes/FooterTest.php
@@ -32,6 +32,7 @@ class FooterTest extends AbstractTestCase
parent::setLanguage();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_SERVER['SCRIPT_NAME'] = 'index.php';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
$GLOBALS['db'] = '';
diff --git a/test/classes/HeaderTest.php b/test/classes/HeaderTest.php
index ca556cb89a..386d14598b 100644
--- a/test/classes/HeaderTest.php
+++ b/test/classes/HeaderTest.php
@@ -26,6 +26,7 @@ class HeaderTest extends AbstractTestCase
parent::setUp();
parent::setTheme();
parent::setLanguage();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['message'] = 'phpmyadminmessage';
diff --git a/test/classes/ImportTest.php b/test/classes/ImportTest.php
index b684bf91e7..a7d17eebfb 100644
--- a/test/classes/ImportTest.php
+++ b/test/classes/ImportTest.php
@@ -24,6 +24,7 @@ class ImportTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['ServerDefault'] = '';
$GLOBALS['complete_query'] = null;
diff --git a/test/classes/ListDatabaseTest.php b/test/classes/ListDatabaseTest.php
index bf45751b4a..ba32b5cf6f 100644
--- a/test/classes/ListDatabaseTest.php
+++ b/test/classes/ListDatabaseTest.php
@@ -24,6 +24,7 @@ class ListDatabaseTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['Server']['only_db'] = ['single\\_db'];
diff --git a/test/classes/Navigation/NavigationTest.php b/test/classes/Navigation/NavigationTest.php
index 2bd6169455..d59712cb3c 100644
--- a/test/classes/Navigation/NavigationTest.php
+++ b/test/classes/Navigation/NavigationTest.php
@@ -27,6 +27,7 @@ class NavigationTest extends AbstractTestCase
{
parent::setUp();
parent::setLanguage();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = '';
diff --git a/test/classes/Navigation/NavigationTreeTest.php b/test/classes/Navigation/NavigationTreeTest.php
index 615e446773..5d9e38d547 100644
--- a/test/classes/Navigation/NavigationTreeTest.php
+++ b/test/classes/Navigation/NavigationTreeTest.php
@@ -25,6 +25,7 @@ class NavigationTreeTest extends AbstractTestCase
parent::setLanguage();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['Server']['host'] = 'localhost';
$GLOBALS['cfg']['Server']['user'] = 'user';
diff --git a/test/classes/Navigation/NodeFactoryTest.php b/test/classes/Navigation/NodeFactoryTest.php
index 6429b8be6c..fa10e6f3bb 100644
--- a/test/classes/Navigation/NodeFactoryTest.php
+++ b/test/classes/Navigation/NodeFactoryTest.php
@@ -19,6 +19,7 @@ class NodeFactoryTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeColumnContainerTest.php b/test/classes/Navigation/Nodes/NodeColumnContainerTest.php
index dc7faa2da9..a2244827e6 100644
--- a/test/classes/Navigation/Nodes/NodeColumnContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeColumnContainerTest.php
@@ -18,6 +18,7 @@ class NodeColumnContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeColumnTest.php b/test/classes/Navigation/Nodes/NodeColumnTest.php
index 783be7c7c1..fd66b85fb2 100644
--- a/test/classes/Navigation/Nodes/NodeColumnTest.php
+++ b/test/classes/Navigation/Nodes/NodeColumnTest.php
@@ -18,6 +18,7 @@ class NodeColumnTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeDatabaseChildTest.php b/test/classes/Navigation/Nodes/NodeDatabaseChildTest.php
index 29980932a3..dc55061f2a 100644
--- a/test/classes/Navigation/Nodes/NodeDatabaseChildTest.php
+++ b/test/classes/Navigation/Nodes/NodeDatabaseChildTest.php
@@ -31,6 +31,7 @@ class NodeDatabaseChildTest extends AbstractTestCase
parent::setUp();
parent::setTheme();
parent::setLanguage();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['ServerDefault'] = 1;
diff --git a/test/classes/Navigation/Nodes/NodeDatabaseTest.php b/test/classes/Navigation/Nodes/NodeDatabaseTest.php
index 84d3476516..83bbeb6f5f 100644
--- a/test/classes/Navigation/Nodes/NodeDatabaseTest.php
+++ b/test/classes/Navigation/Nodes/NodeDatabaseTest.php
@@ -19,6 +19,7 @@ class NodeDatabaseTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['DefaultTabDatabase'] = 'structure';
$GLOBALS['cfg']['MaxNavigationItems'] = 250;
diff --git a/test/classes/Navigation/Nodes/NodeEventContainerTest.php b/test/classes/Navigation/Nodes/NodeEventContainerTest.php
index 017d407694..dac6b635b4 100644
--- a/test/classes/Navigation/Nodes/NodeEventContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeEventContainerTest.php
@@ -18,6 +18,7 @@ class NodeEventContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeEventTest.php b/test/classes/Navigation/Nodes/NodeEventTest.php
index 39a5ba03e5..a771a6f564 100644
--- a/test/classes/Navigation/Nodes/NodeEventTest.php
+++ b/test/classes/Navigation/Nodes/NodeEventTest.php
@@ -18,6 +18,7 @@ class NodeEventTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeFunctionContainerTest.php b/test/classes/Navigation/Nodes/NodeFunctionContainerTest.php
index 2dc2733899..dc7c03e2a5 100644
--- a/test/classes/Navigation/Nodes/NodeFunctionContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeFunctionContainerTest.php
@@ -18,6 +18,7 @@ class NodeFunctionContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeFunctionTest.php b/test/classes/Navigation/Nodes/NodeFunctionTest.php
index be9e9cd892..94e26fc85a 100644
--- a/test/classes/Navigation/Nodes/NodeFunctionTest.php
+++ b/test/classes/Navigation/Nodes/NodeFunctionTest.php
@@ -18,6 +18,7 @@ class NodeFunctionTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeIndexContainerTest.php b/test/classes/Navigation/Nodes/NodeIndexContainerTest.php
index d5769ae9c6..f3539fd815 100644
--- a/test/classes/Navigation/Nodes/NodeIndexContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeIndexContainerTest.php
@@ -18,6 +18,7 @@ class NodeIndexContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeIndexTest.php b/test/classes/Navigation/Nodes/NodeIndexTest.php
index a0db18b579..d28f0e407f 100644
--- a/test/classes/Navigation/Nodes/NodeIndexTest.php
+++ b/test/classes/Navigation/Nodes/NodeIndexTest.php
@@ -18,6 +18,7 @@ class NodeIndexTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php b/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php
index 3b431dd193..107d675d63 100644
--- a/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeProcedureContainerTest.php
@@ -18,6 +18,7 @@ class NodeProcedureContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeProcedureTest.php b/test/classes/Navigation/Nodes/NodeProcedureTest.php
index 79ab299be7..ace18da739 100644
--- a/test/classes/Navigation/Nodes/NodeProcedureTest.php
+++ b/test/classes/Navigation/Nodes/NodeProcedureTest.php
@@ -18,6 +18,7 @@ class NodeProcedureTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeTableContainerTest.php b/test/classes/Navigation/Nodes/NodeTableContainerTest.php
index ef0c7a27b0..b93b4adc52 100644
--- a/test/classes/Navigation/Nodes/NodeTableContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeTableContainerTest.php
@@ -18,6 +18,7 @@ class NodeTableContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
$GLOBALS['cfg']['NavigationTreeDbSeparator'] = '_';
diff --git a/test/classes/Navigation/Nodes/NodeTableTest.php b/test/classes/Navigation/Nodes/NodeTableTest.php
index 739d868854..f9c9916d26 100644
--- a/test/classes/Navigation/Nodes/NodeTableTest.php
+++ b/test/classes/Navigation/Nodes/NodeTableTest.php
@@ -18,6 +18,7 @@ class NodeTableTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['NavigationTreeDefaultTabTable'] = 'search';
diff --git a/test/classes/Navigation/Nodes/NodeTest.php b/test/classes/Navigation/Nodes/NodeTest.php
index 1978139743..41b92a8aa7 100644
--- a/test/classes/Navigation/Nodes/NodeTest.php
+++ b/test/classes/Navigation/Nodes/NodeTest.php
@@ -22,6 +22,7 @@ class NodeTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
}
diff --git a/test/classes/Navigation/Nodes/NodeTriggerContainerTest.php b/test/classes/Navigation/Nodes/NodeTriggerContainerTest.php
index 2817dc341c..d4f2b4d632 100644
--- a/test/classes/Navigation/Nodes/NodeTriggerContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeTriggerContainerTest.php
@@ -18,6 +18,7 @@ class NodeTriggerContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeTriggerTest.php b/test/classes/Navigation/Nodes/NodeTriggerTest.php
index 37d94e9278..c09ea33c43 100644
--- a/test/classes/Navigation/Nodes/NodeTriggerTest.php
+++ b/test/classes/Navigation/Nodes/NodeTriggerTest.php
@@ -18,6 +18,7 @@ class NodeTriggerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/Navigation/Nodes/NodeViewContainerTest.php b/test/classes/Navigation/Nodes/NodeViewContainerTest.php
index 9cbcd9b852..f1ef7bdd54 100644
--- a/test/classes/Navigation/Nodes/NodeViewContainerTest.php
+++ b/test/classes/Navigation/Nodes/NodeViewContainerTest.php
@@ -18,6 +18,7 @@ class NodeViewContainerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['NavigationTreeEnableGrouping'] = true;
$GLOBALS['cfg']['NavigationTreeDbSeparator'] = '_';
diff --git a/test/classes/Navigation/Nodes/NodeViewTest.php b/test/classes/Navigation/Nodes/NodeViewTest.php
index f6158dae3f..b2f5185c2d 100644
--- a/test/classes/Navigation/Nodes/NodeViewTest.php
+++ b/test/classes/Navigation/Nodes/NodeViewTest.php
@@ -18,6 +18,7 @@ class NodeViewTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
}
diff --git a/test/classes/ParseAnalyzeTest.php b/test/classes/ParseAnalyzeTest.php
index 4e35a7a202..05ede35b81 100644
--- a/test/classes/ParseAnalyzeTest.php
+++ b/test/classes/ParseAnalyzeTest.php
@@ -13,6 +13,12 @@ use PhpMyAdmin\StatementInfo;
*/
class ParseAnalyzeTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testSqlQuery(): void
{
$GLOBALS['lang'] = 'en';
diff --git a/test/classes/Partitioning/PartitionTest.php b/test/classes/Partitioning/PartitionTest.php
index 66f0d0b52c..b2f492184a 100644
--- a/test/classes/Partitioning/PartitionTest.php
+++ b/test/classes/Partitioning/PartitionTest.php
@@ -13,6 +13,12 @@ use PhpMyAdmin\Tests\AbstractTestCase;
*/
class PartitionTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testGetPartitionMethodReturnsNull(): void
{
$GLOBALS['server'] = 1;
diff --git a/test/classes/Plugins/Auth/AuthenticationConfigTest.php b/test/classes/Plugins/Auth/AuthenticationConfigTest.php
index 9c55499836..833351b9ea 100644
--- a/test/classes/Plugins/Auth/AuthenticationConfigTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationConfigTest.php
@@ -29,6 +29,7 @@ class AuthenticationConfigTest extends AbstractTestCase
parent::setLanguage();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = 'table';
diff --git a/test/classes/Plugins/Auth/AuthenticationCookieTest.php b/test/classes/Plugins/Auth/AuthenticationCookieTest.php
index e773354609..8e6d650fe3 100644
--- a/test/classes/Plugins/Auth/AuthenticationCookieTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationCookieTest.php
@@ -44,6 +44,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase
parent::setLanguage();
parent::setTheme();
parent::setGlobalConfig();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['db'] = 'db';
diff --git a/test/classes/Plugins/Auth/AuthenticationHttpTest.php b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
index dd9a69df55..60f31c105d 100644
--- a/test/classes/Plugins/Auth/AuthenticationHttpTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationHttpTest.php
@@ -30,6 +30,7 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase
parent::setUp();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['cfg']['Servers'] = [];
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
diff --git a/test/classes/Plugins/Auth/AuthenticationSignonTest.php b/test/classes/Plugins/Auth/AuthenticationSignonTest.php
index a0424bd7b9..94d9246393 100644
--- a/test/classes/Plugins/Auth/AuthenticationSignonTest.php
+++ b/test/classes/Plugins/Auth/AuthenticationSignonTest.php
@@ -34,6 +34,7 @@ class AuthenticationSignonTest extends AbstractNetworkTestCase
parent::setLanguage();
parent::setGlobalConfig();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = 'table';
diff --git a/test/classes/Plugins/Export/ExportCodegenTest.php b/test/classes/Plugins/Export/ExportCodegenTest.php
index 89b7da12ca..4ea73cfdb2 100644
--- a/test/classes/Plugins/Export/ExportCodegenTest.php
+++ b/test/classes/Plugins/Export/ExportCodegenTest.php
@@ -36,6 +36,7 @@ class ExportCodegenTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$this->object = new ExportCodegen(
new Relation($GLOBALS['dbi']),
diff --git a/test/classes/Plugins/Export/ExportCsvTest.php b/test/classes/Plugins/Export/ExportCsvTest.php
index 09982c6235..e84d4553cc 100644
--- a/test/classes/Plugins/Export/ExportCsvTest.php
+++ b/test/classes/Plugins/Export/ExportCsvTest.php
@@ -37,6 +37,7 @@ class ExportCsvTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
diff --git a/test/classes/Plugins/Export/ExportExcelTest.php b/test/classes/Plugins/Export/ExportExcelTest.php
index fb54862894..514cb399ec 100644
--- a/test/classes/Plugins/Export/ExportExcelTest.php
+++ b/test/classes/Plugins/Export/ExportExcelTest.php
@@ -36,6 +36,7 @@ class ExportExcelTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$this->object = new ExportExcel(
new Relation($GLOBALS['dbi']),
diff --git a/test/classes/Plugins/Export/ExportJsonTest.php b/test/classes/Plugins/Export/ExportJsonTest.php
index a77afbbe77..fb8a622817 100644
--- a/test/classes/Plugins/Export/ExportJsonTest.php
+++ b/test/classes/Plugins/Export/ExportJsonTest.php
@@ -34,6 +34,7 @@ class ExportJsonTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$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 2dbb011ad2..94d717021c 100644
--- a/test/classes/Plugins/Export/ExportLatexTest.php
+++ b/test/classes/Plugins/Export/ExportLatexTest.php
@@ -40,6 +40,7 @@ class ExportLatexTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['output_kanji_conversion'] = false;
$GLOBALS['output_charset_conversion'] = false;
diff --git a/test/classes/Plugins/Export/ExportMediawikiTest.php b/test/classes/Plugins/Export/ExportMediawikiTest.php
index 1e5dfae784..e34009459f 100644
--- a/test/classes/Plugins/Export/ExportMediawikiTest.php
+++ b/test/classes/Plugins/Export/ExportMediawikiTest.php
@@ -39,6 +39,7 @@ class ExportMediawikiTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['output_kanji_conversion'] = false;
$GLOBALS['output_charset_conversion'] = false;
diff --git a/test/classes/Plugins/Export/ExportOdsTest.php b/test/classes/Plugins/Export/ExportOdsTest.php
index 37b851494f..4029e353f4 100644
--- a/test/classes/Plugins/Export/ExportOdsTest.php
+++ b/test/classes/Plugins/Export/ExportOdsTest.php
@@ -48,6 +48,7 @@ class ExportOdsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['output_kanji_conversion'] = false;
$GLOBALS['output_charset_conversion'] = false;
diff --git a/test/classes/Plugins/Export/ExportPdfTest.php b/test/classes/Plugins/Export/ExportPdfTest.php
index b60f194604..9a06351244 100644
--- a/test/classes/Plugins/Export/ExportPdfTest.php
+++ b/test/classes/Plugins/Export/ExportPdfTest.php
@@ -36,6 +36,7 @@ class ExportPdfTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$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 4ca6a7e4f7..3e7c67f004 100644
--- a/test/classes/Plugins/Export/ExportPhparrayTest.php
+++ b/test/classes/Plugins/Export/ExportPhparrayTest.php
@@ -35,6 +35,7 @@ class ExportPhparrayTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$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 717fe4e46e..c907de040b 100644
--- a/test/classes/Plugins/Export/ExportSqlTest.php
+++ b/test/classes/Plugins/Export/ExportSqlTest.php
@@ -53,6 +53,7 @@ class ExportSqlTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
diff --git a/test/classes/Plugins/Export/ExportXmlTest.php b/test/classes/Plugins/Export/ExportXmlTest.php
index 7c5f04b82c..41fcbf02d8 100644
--- a/test/classes/Plugins/Export/ExportXmlTest.php
+++ b/test/classes/Plugins/Export/ExportXmlTest.php
@@ -38,6 +38,7 @@ class ExportXmlTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['output_kanji_conversion'] = false;
$GLOBALS['buffer_needed'] = false;
diff --git a/test/classes/Plugins/Export/ExportYamlTest.php b/test/classes/Plugins/Export/ExportYamlTest.php
index 88769ba365..32d51f3581 100644
--- a/test/classes/Plugins/Export/ExportYamlTest.php
+++ b/test/classes/Plugins/Export/ExportYamlTest.php
@@ -35,6 +35,7 @@ class ExportYamlTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['output_kanji_conversion'] = false;
$GLOBALS['buffer_needed'] = false;
diff --git a/test/classes/Plugins/Import/ImportLdiTest.php b/test/classes/Plugins/Import/ImportLdiTest.php
index 34a78fb2d1..caf7023de0 100644
--- a/test/classes/Plugins/Import/ImportLdiTest.php
+++ b/test/classes/Plugins/Import/ImportLdiTest.php
@@ -24,6 +24,7 @@ class ImportLdiTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['charset_conversion'] = null;
$GLOBALS['ldi_terminated'] = null;
$GLOBALS['ldi_escaped'] = null;
diff --git a/test/classes/Plugins/Import/ImportMediawikiTest.php b/test/classes/Plugins/Import/ImportMediawikiTest.php
index b6b94a4b81..8e74ce9abb 100644
--- a/test/classes/Plugins/Import/ImportMediawikiTest.php
+++ b/test/classes/Plugins/Import/ImportMediawikiTest.php
@@ -26,6 +26,7 @@ class ImportMediawikiTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['error'] = null;
$GLOBALS['timeout_passed'] = null;
diff --git a/test/classes/Plugins/Import/ImportOdsTest.php b/test/classes/Plugins/Import/ImportOdsTest.php
index f32ae22761..1b80aba6f9 100644
--- a/test/classes/Plugins/Import/ImportOdsTest.php
+++ b/test/classes/Plugins/Import/ImportOdsTest.php
@@ -35,6 +35,7 @@ class ImportOdsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['plugin_param'] = 'csv';
$GLOBALS['error'] = null;
diff --git a/test/classes/Plugins/Import/ImportSqlTest.php b/test/classes/Plugins/Import/ImportSqlTest.php
index 182271de38..94853c7201 100644
--- a/test/classes/Plugins/Import/ImportSqlTest.php
+++ b/test/classes/Plugins/Import/ImportSqlTest.php
@@ -24,6 +24,7 @@ class ImportSqlTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['error'] = null;
$GLOBALS['timeout_passed'] = null;
diff --git a/test/classes/Plugins/Import/ImportXmlTest.php b/test/classes/Plugins/Import/ImportXmlTest.php
index d9726dbb23..17c80d8c38 100644
--- a/test/classes/Plugins/Import/ImportXmlTest.php
+++ b/test/classes/Plugins/Import/ImportXmlTest.php
@@ -28,6 +28,7 @@ class ImportXmlTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['error'] = null;
$GLOBALS['timeout_passed'] = null;
diff --git a/test/classes/Plugins/Schema/DiaRelationSchemaTest.php b/test/classes/Plugins/Schema/DiaRelationSchemaTest.php
index 679c8b8a0b..a295ed1a27 100644
--- a/test/classes/Plugins/Schema/DiaRelationSchemaTest.php
+++ b/test/classes/Plugins/Schema/DiaRelationSchemaTest.php
@@ -23,6 +23,7 @@ class DiaRelationSchemaTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_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 aaaeb11612..0a52c0c512 100644
--- a/test/classes/Plugins/Schema/EpsRelationSchemaTest.php
+++ b/test/classes/Plugins/Schema/EpsRelationSchemaTest.php
@@ -22,6 +22,7 @@ class EpsRelationSchemaTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_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 bca05ad3a6..52bdf6a217 100644
--- a/test/classes/Plugins/Schema/ExportRelationSchemaTest.php
+++ b/test/classes/Plugins/Schema/ExportRelationSchemaTest.php
@@ -22,6 +22,7 @@ class ExportRelationSchemaTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_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 c43e21431d..6753923df8 100644
--- a/test/classes/Plugins/Schema/PdfRelationSchemaTest.php
+++ b/test/classes/Plugins/Schema/PdfRelationSchemaTest.php
@@ -22,6 +22,7 @@ class PdfRelationSchemaTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_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 1d3610cf56..d9ffae446c 100644
--- a/test/classes/Plugins/Schema/SvgRelationSchemaTest.php
+++ b/test/classes/Plugins/Schema/SvgRelationSchemaTest.php
@@ -23,6 +23,7 @@ class SvgRelationSchemaTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$_REQUEST['page_number'] = 33;
$_REQUEST['svg_show_color'] = true;
$_REQUEST['svg_show_keys'] = true;
diff --git a/test/classes/PluginsTest.php b/test/classes/PluginsTest.php
index f86ee7cd80..02f7c42ef6 100644
--- a/test/classes/PluginsTest.php
+++ b/test/classes/PluginsTest.php
@@ -17,6 +17,7 @@ class PluginsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
parent::loadDbiIntoContainerBuilder();
}
diff --git a/test/classes/ProfilingTest.php b/test/classes/ProfilingTest.php
index 752491e6b1..7a286bb628 100644
--- a/test/classes/ProfilingTest.php
+++ b/test/classes/ProfilingTest.php
@@ -14,6 +14,7 @@ class ProfilingTest extends AbstractTestCase
{
public function testIsSupported(): void
{
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
SessionCache::set('profiling_supported', true);
diff --git a/test/classes/ReplicationGuiTest.php b/test/classes/ReplicationGuiTest.php
index 11f0136205..7f3e366237 100644
--- a/test/classes/ReplicationGuiTest.php
+++ b/test/classes/ReplicationGuiTest.php
@@ -27,6 +27,7 @@ class ReplicationGuiTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
//$_POST
$_POST['primary_add_user'] = 'primary_add_user';
diff --git a/test/classes/ResponseTest.php b/test/classes/ResponseTest.php
index 4593b06bee..6a59f26cdf 100644
--- a/test/classes/ResponseTest.php
+++ b/test/classes/ResponseTest.php
@@ -14,6 +14,7 @@ class ResponseTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['lang'] = 'en';
$GLOBALS['server'] = 1;
diff --git a/test/classes/Server/PluginsTest.php b/test/classes/Server/PluginsTest.php
index 620aeed64b..98deec792e 100644
--- a/test/classes/Server/PluginsTest.php
+++ b/test/classes/Server/PluginsTest.php
@@ -18,6 +18,12 @@ class PluginsTest extends AbstractTestCase
/** @var Plugins */
private $plugins;
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
public function testGetAll(): void
{
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
diff --git a/test/classes/SystemDatabaseTest.php b/test/classes/SystemDatabaseTest.php
index 8652a4eae9..ab0716a9b9 100644
--- a/test/classes/SystemDatabaseTest.php
+++ b/test/classes/SystemDatabaseTest.php
@@ -27,6 +27,7 @@ class SystemDatabaseTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
/**
* SET these to avoid undefine d index error
*/
diff --git a/test/classes/Table/SearchTest.php b/test/classes/Table/SearchTest.php
index c71fa2e884..9da2ed4d8b 100644
--- a/test/classes/Table/SearchTest.php
+++ b/test/classes/Table/SearchTest.php
@@ -18,6 +18,7 @@ class SearchTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->search = new Search($GLOBALS['dbi']);
}
diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php
index 421954855c..1ce3e5689b 100644
--- a/test/classes/TrackerTest.php
+++ b/test/classes/TrackerTest.php
@@ -23,6 +23,7 @@ class TrackerTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
parent::loadDbiIntoContainerBuilder();
/**
diff --git a/test/classes/TrackingTest.php b/test/classes/TrackingTest.php
index 2400c3dd19..6f30fa4c7a 100644
--- a/test/classes/TrackingTest.php
+++ b/test/classes/TrackingTest.php
@@ -31,6 +31,7 @@ class TrackingTest extends AbstractTestCase
{
parent::setUp();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 1;
$GLOBALS['db'] = 'PMA_db';
diff --git a/test/classes/TransformationsTest.php b/test/classes/TransformationsTest.php
index 11d8dc4ec2..8cf29c9fb3 100644
--- a/test/classes/TransformationsTest.php
+++ b/test/classes/TransformationsTest.php
@@ -22,6 +22,7 @@ class TransformationsTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['table'] = 'table';
$GLOBALS['db'] = 'db';
$GLOBALS['cfg'] = [
diff --git a/test/classes/TypesTest.php b/test/classes/TypesTest.php
index d69b102e05..222d8cd454 100644
--- a/test/classes/TypesTest.php
+++ b/test/classes/TypesTest.php
@@ -21,6 +21,7 @@ class TypesTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->object = new Types($GLOBALS['dbi']);
}
diff --git a/test/classes/UserPasswordTest.php b/test/classes/UserPasswordTest.php
index 1486cb785d..97ba76fc2d 100644
--- a/test/classes/UserPasswordTest.php
+++ b/test/classes/UserPasswordTest.php
@@ -25,6 +25,7 @@ class UserPasswordTest extends AbstractTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$relation = new Relation($GLOBALS['dbi']);
$serverPrivileges = new Privileges(
diff --git a/test/classes/UserPreferencesTest.php b/test/classes/UserPreferencesTest.php
index b60810d631..edcfc2c1bb 100644
--- a/test/classes/UserPreferencesTest.php
+++ b/test/classes/UserPreferencesTest.php
@@ -28,6 +28,7 @@ class UserPreferencesTest extends AbstractNetworkTestCase
protected function setUp(): void
{
parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$GLOBALS['server'] = 0;
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['PMA_PHP_SELF'] = '/phpmyadmin/';
diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php
index e6f645f4db..0c24278741 100644
--- a/test/classes/UtilTest.php
+++ b/test/classes/UtilTest.php
@@ -51,6 +51,7 @@ class UtilTest extends AbstractTestCase
parent::setUp();
parent::setLanguage();
parent::setTheme();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
}
/**
diff --git a/test/classes/Utils/ForeignKeyTest.php b/test/classes/Utils/ForeignKeyTest.php
index e792de8985..a941b2a9c5 100644
--- a/test/classes/Utils/ForeignKeyTest.php
+++ b/test/classes/Utils/ForeignKeyTest.php
@@ -13,6 +13,12 @@ use PhpMyAdmin\Utils\ForeignKey;
*/
class ForeignKeyTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
/**
* foreign key supported test
*
diff --git a/test/classes/Utils/GisTest.php b/test/classes/Utils/GisTest.php
index d30cf24d62..193dccf870 100644
--- a/test/classes/Utils/GisTest.php
+++ b/test/classes/Utils/GisTest.php
@@ -16,6 +16,12 @@ use function hex2bin;
*/
class GisTest extends AbstractTestCase
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
+ }
+
/**
* @param string $expectedQuery The query to expect
* @param array $returnData The data to return for fetchRow
diff --git a/test/classes/Utils/HttpRequestTest.php b/test/classes/Utils/HttpRequestTest.php
index 3824aa15e8..77deb3602c 100644
--- a/test/classes/Utils/HttpRequestTest.php
+++ b/test/classes/Utils/HttpRequestTest.php
@@ -26,6 +26,7 @@ class HttpRequestTest extends AbstractTestCase
{
parent::setUp();
parent::setProxySettings();
+ $GLOBALS['dbi'] = $this->createDatabaseInterface();
$this->httpRequest = new HttpRequest();
}