You are here

public function EnvironmentCleanerFactory::createCleaner in SimpleTest 8.3

Factory method to create the environment cleaner service.

Return value

\Drupal\simpletest\EnvironmentCleanerService The environment cleaner service.

File

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;
}