function EnvironmentCleaner::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::__construct()
  2. 10 core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::__construct()
  3. 11.x core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::__construct()

Construct an environment cleaner.

Parameters

string $root: The path to the root of the Drupal installation.

\Drupal\Core\Database\Connection $test_database: Connection to the database against which tests were run.

\Drupal\Core\Database\Connection $results_database: Connection to the database where test results were stored. This could be the same as $test_database, or it could be different.

\Symfony\Component\Console\Output\OutputInterface $output: A symfony console output object.

\Drupal\Core\File\FileSystemInterface $file_system: The file_system service.

File

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

Class

EnvironmentCleaner
Helper class for cleaning test environments.

Namespace

Drupal\Core\Test

Code

public function __construct($root, Connection $test_database, Connection $results_database, OutputInterface $output, FileSystemInterface $file_system) {
    $this->root = $root;
    $this->testDatabase = $test_database;
    $this->resultsDatabase = $results_database;
    $this->output = $output;
    $this->fileSystem = $file_system;
}

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