You are here

public function EnvironmentCleanerFactory::createCleaner in Drupal 8

Factory method to create the environment cleaner service.

Return value

\Drupal\simpletest\EnvironmentCleanerService The environment cleaner service.

File

core/modules/simpletest/src/EnvironmentCleanerFactory.php, line 40

Class

EnvironmentCleanerFactory
Test environment cleaner factory.

Namespace

Drupal\simpletest

Code

public function createCleaner() {
  $cleaner = new EnvironmentCleanerService($this->container
    ->get('app.root'), Database::getConnection(), TestDatabase::getConnection(), $this->container
    ->get('messenger'), $this->container
    ->get('string_translation'), $this->container
    ->get('config.factory'), $this->container
    ->get('cache.default'), $this->container
    ->get('file_system'));
  return $cleaner;
}