You are here

public function EnvironmentCleaner::cleanDatabase in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::cleanDatabase()

Remove database entries left over in the fixture database.

Overrides EnvironmentCleanerInterface::cleanDatabase

1 method overrides EnvironmentCleaner::cleanDatabase()
EnvironmentCleanerService::cleanDatabase in core/modules/simpletest/src/EnvironmentCleanerService.php
Remove database entries left over in the fixture database.

File

core/lib/Drupal/Core/Test/EnvironmentCleaner.php, line 99

Class

EnvironmentCleaner
Helper class for cleaning test environments.

Namespace

Drupal\Core\Test

Code

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.');
  }
}