1 simpletest.module | simpletest_clean_profile_cache_tables() |
Removes cached profile tables from the database.
File
- core/
modules/ simpletest/ simpletest.module, line 629 - Provides testing functionality.
Code
function simpletest_clean_profile_cache_tables() {
$tables = db_find_tables(Database::getConnection()->prefixTables('{simpletest_cache_}') . '%');
$count = count($tables);
foreach ($tables as $table) {
db_drop_table($table);
}
if ($count > 0) {
backdrop_set_message(format_plural($count, 'Removed 1 profile cache table.', 'Removed @count profile cache tables.'));
}
else {
backdrop_set_message(t('No profile cache tables to remove.'));
}
}