You are here

public function EnvironmentCleaner::cleanTemporaryDirectories in Drupal 9

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

Finds all leftover fixture site directories and removes them.

Overrides EnvironmentCleanerInterface::cleanTemporaryDirectories

File

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

Class

EnvironmentCleaner
Helper class for cleaning test environments.

Namespace

Drupal\Core\Test

Code

public function cleanTemporaryDirectories() {
  $count = $this
    ->doCleanTemporaryDirectories();
  if ($count > 0) {
    $this->output
      ->write('Temporary directories removed: ' . $count);
  }
  else {
    $this->output
      ->write('No temporary directories to remove.');
  }
}