diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-04-22 10:28:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 10:28:58 +0300 |
commit | 59bc5384af96672b3740d18a439295bc9948dc54 (patch) | |
tree | 4718b09cc17f708e07f7522ad573ac7ddeb013b1 /tests | |
parent | 6d726c8005d6dd537ca7112b22d12ad70156af74 (diff) |
Do not use DbHelper::getTablesInstalled() in integration test setup since it posts event that loads all activated plugins. (#17480)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Framework/TestCase/SystemTestCase.php | 6 |
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; |