You are here

public function EnvironmentCleanerService::cleanTemporaryDirectories in Drupal 8

Finds all leftover fixture site directories and removes them.

Overrides EnvironmentCleaner::cleanTemporaryDirectories

1 call to EnvironmentCleanerService::cleanTemporaryDirectories()
EnvironmentCleanerService::cleanEnvironment in core/modules/simpletest/src/EnvironmentCleanerService.php
Removes all test-related database tables and directories.

File

core/modules/simpletest/src/EnvironmentCleanerService.php, line 114

Class

EnvironmentCleanerService
Uses containerized services to perform post-test cleanup.

Namespace

Drupal\simpletest

Code

public function cleanTemporaryDirectories() {
  $directories_removed = $this
    ->doCleanTemporaryDirectories();
  if ($directories_removed > 0) {
    $this->messenger
      ->addMessage($this->translation
      ->formatPlural($directories_removed, 'Removed 1 temporary directory.', 'Removed @count temporary directories.'));
  }
  else {
    $this->messenger
      ->addMessage($this->translation
      ->translate('No temporary directories to remove.'));
  }
}