diff --git a/test/classes/AbstractTestCase.php b/test/classes/AbstractTestCase.php
index a40f312f41..cf07295c60 100644
--- a/test/classes/AbstractTestCase.php
+++ b/test/classes/AbstractTestCase.php
@@ -102,16 +102,6 @@ abstract class AbstractTestCase extends TestCase
Cache::purge();
}
- protected function assertAllSelectsConsumed(): void
- {
- $unUsedSelects = $this->dummyDbi->getUnUsedDatabaseSelects();
- $this->assertSame(
- [],
- $unUsedSelects,
- 'Some database selects where not used !'
- );
- }
-
protected function loadContainerBuilder(): void
{
$GLOBALS['containerBuilder'] = Core::getContainerBuilder();
diff --git a/test/classes/BookmarkTest.php b/test/classes/BookmarkTest.php
index 588c77c956..24cd7ad5f1 100644
--- a/test/classes/BookmarkTest.php
+++ b/test/classes/BookmarkTest.php
@@ -47,7 +47,7 @@ class BookmarkTest extends AbstractTestCase
'sakila'
);
$this->assertContainsOnlyInstancesOf(Bookmark::class, $actual);
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
}
/**
@@ -64,7 +64,7 @@ class BookmarkTest extends AbstractTestCase
'1'
)
);
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
}
/**
@@ -83,6 +83,6 @@ class BookmarkTest extends AbstractTestCase
$this->assertNotFalse($bookmark);
$this->dummyDbi->addSelectDb('phpmyadmin');
$this->assertFalse($bookmark->save());
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
}
}
diff --git a/test/classes/Controllers/Import/ImportControllerTest.php b/test/classes/Controllers/Import/ImportControllerTest.php
index 16a0ffa675..a7cbee1b59 100644
--- a/test/classes/Controllers/Import/ImportControllerTest.php
+++ b/test/classes/Controllers/Import/ImportControllerTest.php
@@ -58,7 +58,7 @@ class ImportControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('pma_test');
$this->dummyDbi->addSelectDb('pma_test');
$importController();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$this->assertResponseWasSuccessfull();
$this->assertStringContainsString(
diff --git a/test/classes/Controllers/NormalizationControllerTest.php b/test/classes/Controllers/NormalizationControllerTest.php
index e13d076ba1..b5155210f9 100644
--- a/test/classes/Controllers/NormalizationControllerTest.php
+++ b/test/classes/Controllers/NormalizationControllerTest.php
@@ -141,7 +141,7 @@ class NormalizationControllerTest extends AbstractTestCase
$normalizationController = $GLOBALS['containerBuilder']->get(NormalizationController::class);
$this->dummyDbi->addSelectDb('my_db');
$normalizationController();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$this->assertResponseWasSuccessfull();
@@ -179,7 +179,7 @@ class NormalizationControllerTest extends AbstractTestCase
$normalizationController = $GLOBALS['containerBuilder']->get(NormalizationController::class);
$this->dummyDbi->addSelectDb('my_db');
$normalizationController();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$this->assertResponseWasSuccessfull();
diff --git a/test/classes/Controllers/Server/BinlogControllerTest.php b/test/classes/Controllers/Server/BinlogControllerTest.php
index e87e429def..6499422712 100644
--- a/test/classes/Controllers/Server/BinlogControllerTest.php
+++ b/test/classes/Controllers/Server/BinlogControllerTest.php
@@ -48,7 +48,7 @@ class BinlogControllerTest extends AbstractTestCase
$_POST['pos'] = '3';
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('Select binary log to view', $actual);
diff --git a/test/classes/Controllers/Server/CollationsControllerTest.php b/test/classes/Controllers/Server/CollationsControllerTest.php
index 7b872d85ec..2784e01443 100644
--- a/test/classes/Controllers/Server/CollationsControllerTest.php
+++ b/test/classes/Controllers/Server/CollationsControllerTest.php
@@ -39,7 +39,7 @@ class CollationsControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('
latin1
', $actual);
diff --git a/test/classes/Controllers/Server/DatabasesControllerTest.php b/test/classes/Controllers/Server/DatabasesControllerTest.php
index 1a2dfa0abe..fb040ee0e9 100644
--- a/test/classes/Controllers/Server/DatabasesControllerTest.php
+++ b/test/classes/Controllers/Server/DatabasesControllerTest.php
@@ -61,7 +61,7 @@ class DatabasesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringContainsString('data-filter-row="SAKILA"', $actual);
@@ -98,7 +98,7 @@ class DatabasesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$this->assertStringNotContainsString(__('Enable statistics'), $actual);
diff --git a/test/classes/Controllers/Server/EnginesControllerTest.php b/test/classes/Controllers/Server/EnginesControllerTest.php
index 808c56b773..46a1d900d5 100644
--- a/test/classes/Controllers/Server/EnginesControllerTest.php
+++ b/test/classes/Controllers/Server/EnginesControllerTest.php
@@ -39,7 +39,7 @@ class EnginesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller->__invoke();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
diff --git a/test/classes/Controllers/Server/PluginsControllerTest.php b/test/classes/Controllers/Server/PluginsControllerTest.php
index a14480558c..1ea14cb65a 100644
--- a/test/classes/Controllers/Server/PluginsControllerTest.php
+++ b/test/classes/Controllers/Server/PluginsControllerTest.php
@@ -69,7 +69,7 @@ class PluginsControllerTest extends AbstractTestCase
$controller = new PluginsController($response, new Template(), new Plugins($dbi), $GLOBALS['dbi']);
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
//validate 1:Items
diff --git a/test/classes/Controllers/Server/ShowEngineControllerTest.php b/test/classes/Controllers/Server/ShowEngineControllerTest.php
index 37dd3b7c9c..6da1e97071 100644
--- a/test/classes/Controllers/Server/ShowEngineControllerTest.php
+++ b/test/classes/Controllers/Server/ShowEngineControllerTest.php
@@ -42,7 +42,7 @@ class ShowEngineControllerTest extends AbstractTestCase
'page' => 'page',
]);
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$actual = $response->getHTMLResult();
$enginePlugin = StorageEngine::getEngine('Pbxt');
diff --git a/test/classes/Controllers/Server/Status/Monitor/GeneralLogControllerTest.php b/test/classes/Controllers/Server/Status/Monitor/GeneralLogControllerTest.php
index f1394a3021..772258e7b2 100644
--- a/test/classes/Controllers/Server/Status/Monitor/GeneralLogControllerTest.php
+++ b/test/classes/Controllers/Server/Status/Monitor/GeneralLogControllerTest.php
@@ -67,7 +67,7 @@ class GeneralLogControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$ret = $response->getJSONResult();
$resultRows = [
diff --git a/test/classes/Controllers/Server/Status/Monitor/LogVarsControllerTest.php b/test/classes/Controllers/Server/Status/Monitor/LogVarsControllerTest.php
index 13c217d78c..cec8744a61 100644
--- a/test/classes/Controllers/Server/Status/Monitor/LogVarsControllerTest.php
+++ b/test/classes/Controllers/Server/Status/Monitor/LogVarsControllerTest.php
@@ -60,7 +60,7 @@ class LogVarsControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$ret = $response->getJSONResult();
$this->assertEquals($value, $ret['message']);
diff --git a/test/classes/Controllers/Server/Status/Monitor/SlowLogControllerTest.php b/test/classes/Controllers/Server/Status/Monitor/SlowLogControllerTest.php
index 9ac2380439..d98a449787 100644
--- a/test/classes/Controllers/Server/Status/Monitor/SlowLogControllerTest.php
+++ b/test/classes/Controllers/Server/Status/Monitor/SlowLogControllerTest.php
@@ -54,7 +54,7 @@ class SlowLogControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$ret = $response->getJSONResult();
$resultRows = [
diff --git a/test/classes/Controllers/Server/Status/MonitorControllerTest.php b/test/classes/Controllers/Server/Status/MonitorControllerTest.php
index f6dbf39dd7..2b4861e846 100644
--- a/test/classes/Controllers/Server/Status/MonitorControllerTest.php
+++ b/test/classes/Controllers/Server/Status/MonitorControllerTest.php
@@ -50,7 +50,7 @@ class MonitorControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('', $html);
diff --git a/test/classes/Controllers/Server/Status/ProcessesControllerTest.php b/test/classes/Controllers/Server/Status/ProcessesControllerTest.php
index 2102ba3bce..226e5c5812 100644
--- a/test/classes/Controllers/Server/Status/ProcessesControllerTest.php
+++ b/test/classes/Controllers/Server/Status/ProcessesControllerTest.php
@@ -50,7 +50,7 @@ class ProcessesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString(
@@ -82,7 +82,7 @@ class ProcessesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('Truncate shown queries', $html);
@@ -95,7 +95,7 @@ class ProcessesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('Host', $html);
diff --git a/test/classes/Controllers/Server/Status/QueriesControllerTest.php b/test/classes/Controllers/Server/Status/QueriesControllerTest.php
index 72631228b1..e174d344b2 100644
--- a/test/classes/Controllers/Server/Status/QueriesControllerTest.php
+++ b/test/classes/Controllers/Server/Status/QueriesControllerTest.php
@@ -57,7 +57,7 @@ class QueriesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$hourFactor = 3600 / $this->data->status['Uptime'];
diff --git a/test/classes/Controllers/Server/Status/StatusControllerTest.php b/test/classes/Controllers/Server/Status/StatusControllerTest.php
index 07812a4c75..24398f790c 100644
--- a/test/classes/Controllers/Server/Status/StatusControllerTest.php
+++ b/test/classes/Controllers/Server/Status/StatusControllerTest.php
@@ -65,7 +65,7 @@ class StatusControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$traffic = $bytesReceived + $bytesSent;
diff --git a/test/classes/Controllers/Server/Status/VariablesControllerTest.php b/test/classes/Controllers/Server/Status/VariablesControllerTest.php
index 3c6a9271f6..e020664c1a 100644
--- a/test/classes/Controllers/Server/Status/VariablesControllerTest.php
+++ b/test/classes/Controllers/Server/Status/VariablesControllerTest.php
@@ -43,7 +43,7 @@ class VariablesControllerTest extends AbstractTestCase
$this->dummyDbi->addSelectDb('mysql');
$controller();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString('
', $html);
diff --git a/test/classes/Controllers/Table/ReplaceControllerTest.php b/test/classes/Controllers/Table/ReplaceControllerTest.php
index 3b656a4456..a856fb282d 100644
--- a/test/classes/Controllers/Table/ReplaceControllerTest.php
+++ b/test/classes/Controllers/Table/ReplaceControllerTest.php
@@ -133,7 +133,7 @@ class ReplaceControllerTest extends AbstractTestCase
$dummyDbi->addSelectDb('my_db');
$replaceController($request);
$output = $response->getHTMLResult();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$this->assertStringContainsString(
'class="icon ic_s_success"> Showing rows 0 - 1 (2 total, Query took',
$output
@@ -181,7 +181,7 @@ class ReplaceControllerTest extends AbstractTestCase
$replaceController($request);
$output = $response->getHTMLResult();
- $this->assertAllSelectsConsumed();
+ $this->dummyDbi->assertAllSelectsConsumed();
$this->assertEquals(5, $GLOBALS['cfg']['InsertRows']);
$this->assertStringContainsString(
'