function EnvironmentCleanerService::cleanTemporaryDirectories

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.