You are here

public function EnvironmentCleaner::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Test/EnvironmentCleaner.php \Drupal\Core\Test\EnvironmentCleaner::__construct()
  2. 9 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;
}