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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2021-04-22 10:28:58 +0300
committerGitHub <noreply@github.com>2021-04-22 10:28:58 +0300
commit59bc5384af96672b3740d18a439295bc9948dc54 (patch)
tree4718b09cc17f708e07f7522ad573ac7ddeb013b1 /tests/PHPUnit/Framework
parent6d726c8005d6dd537ca7112b22d12ad70156af74 (diff)
Do not use DbHelper::getTablesInstalled() in integration test setup since it posts event that loads all activated plugins. (#17480)
Diffstat (limited to 'tests/PHPUnit/Framework')
-rw-r--r--tests/PHPUnit/Framework/TestCase/SystemTestCase.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
index a5648389cc..8a3f929188 100644
--- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
@@ -731,7 +731,11 @@ abstract class SystemTestCase extends TestCase
protected static function getDbTablesWithData()
{
$result = array();
- foreach (DbHelper::getTablesInstalled() as $tableName) {
+ $tables = Db::fetchAll('SHOW TABLES'); // tests should be in a clean database, so we can just get all tables
+ if (!empty($tables)) {
+ $tables = array_column($tables, key($tables[0]));
+ }
+ foreach ($tables as $tableName) {
$result[$tableName] = Db::fetchAll("SELECT * FROM `$tableName`");
}
return $result;