public function EnvironmentCleaner::cleanDatabase in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::cleanDatabase()
Remove database entries left over in the fixture database.
Overrides EnvironmentCleanerInterface::cleanDatabase
File
- core/
lib/ Drupal/ Core/ Test/ EnvironmentCleaner.php, line 99
Class
- EnvironmentCleaner
- Helper class for cleaning test environments.
Namespace
Drupal\Core\TestCode
public function cleanDatabase() {
$count = $this
->doCleanDatabase();
if ($count > 0) {
$this->output
->write('Leftover tables removed: ' . $count);
}
else {
$this->output
->write('No leftover tables to remove.');
}
}