You are here

public function TestRunnerKernel::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Test/TestRunnerKernel.php \Drupal\Core\Test\TestRunnerKernel::__construct()

Constructs a DrupalKernel object.

Parameters

string $environment: String indicating the environment, e.g. 'prod' or 'dev'.

$class_loader: The class loader. Normally \Composer\Autoload\ClassLoader, as included by the front controller, but may also be decorated; e.g., \Symfony\Component\ClassLoader\ApcClassLoader.

bool $allow_dumping: (optional) FALSE to stop the container from being written to or read from disk. Defaults to TRUE.

Overrides DrupalKernel::__construct

File

core/lib/Drupal/Core/Test/TestRunnerKernel.php, line 30
Contains \Drupal\Core\Test\TestRunnerKernel.

Class

TestRunnerKernel
Kernel for run-tests.sh.

Namespace

Drupal\Core\Test

Code

public function __construct($environment, $class_loader) {
  parent::__construct($environment, $class_loader, FALSE);

  // Prime the module list and corresponding Extension objects.
  // @todo Remove System module. Needed because
  //   \Drupal\Core\Datetime\DateFormatter has a (needless) dependency on the
  //   'date_format' entity, so calls to format_date()/format_interval() cause
  //   a plugin not found exception.
  $this->moduleList = array(
    'system' => 0,
    'simpletest' => 0,
  );
  $this->moduleData = array(
    'system' => new Extension($this->root, 'module', 'core/modules/system/system.info.yml', 'system.module'),
    'simpletest' => new Extension($this->root, 'module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'),
  );
}