diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 847dd6e..ebb1277 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -673,12 +673,12 @@ function simpletest_clean_environment() { * Removes prefixed tables from the database from crashed tests. */ function simpletest_clean_database() { - $tables = db_find_tables(Database::getConnection()->prefixTables('{test}') . '%'); + $tables = db_find_tables('test%'); $count = 0; foreach ($tables as $table) { - // Strip the prefix and skip tables without digits following "simpletest", - // e.g. {simpletest_test_id}. - if (preg_match('/test\d+.*/', $table, $matches)) { + // Only drop tables which begin wih 'test' followed by digits, for example, + // example, {test12345678node__body}. + if (preg_match('/^test\d+.*/', $table, $matches)) { db_drop_table($matches[0]); $count++; }