function EnvironmentCleanerFactory::createCleaner

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

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