function simpletest_clean_database
Same name in other branches
- 7.x modules/simpletest/simpletest.module \simpletest_clean_database()
Removes prefixed tables from the database from crashed tests.
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Access the environment_cleaner service and call its cleanDatabase() method, or use \Drupal\Core\Test\EnvironmentCleaner::cleanDatabase() instead.
See also
https://www.drupal.org/node/3076634
1 call to simpletest_clean_database()
- DeprecatedCleanupTest::testDeprecatedCleanFunctions in core/
modules/ simpletest/ tests/ src/ Kernel/ DeprecatedCleanupTest.php - @expectedDeprecation simpletest_clean_environment is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Access the environment_cleaner service and call its cleanEnvironment() method, or useā¦
File
-
core/
modules/ simpletest/ simpletest.module, line 628
Code
function simpletest_clean_database() {
@trigger_error(__FUNCTION__ . ' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Access the environment_cleaner service and call its cleanDatabase() method, or use \\Drupal\\Core\\Test\\EnvironmentCleaner::cleanDatabase() instead. See https://www.drupal.org/node/3076634', E_USER_DEPRECATED);
/* @var $cleaner \Drupal\simpletest\EnvironmentCleanerService */
$cleaner = \Drupal::service('environment_cleaner');
$cleaner->cleanDatabase();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.