diff --git a/core/lib/Drupal/Core/Test/TestKernel.php b/core/lib/Drupal/Core/Test/TestKernel.php index 6e1aa89..55909a0 100644 --- a/core/lib/Drupal/Core/Test/TestKernel.php +++ b/core/lib/Drupal/Core/Test/TestKernel.php @@ -24,11 +24,9 @@ class TestKernel extends DrupalKernel { * The classloader. */ public function __construct(ClassLoader $class_loader) { - $this->environment = 'test-runner'; - $this->booted = FALSE; - $this->classLoader = $class_loader; - $this->allowDumping = FALSE; + parent::__construct('test_runner', $class_loader, FALSE); + // Prime the module list and corresponding Extension objects. // @todo Remove System module. Needed because \Drupal\Core\Datetime\Date // has a (needless) dependency on the 'date_format' entity, so calls to // format_date()/format_interval() cause a plugin not found exception. @@ -47,6 +45,8 @@ public function __construct(ClassLoader $class_loader) { */ public function discoverServiceProviders() { $providers = parent::discoverServiceProviders(); + // The test runner does not require an installed Drupal site to exist. + // Therefore, its environment is identical to that of the early installer. $this->serviceProviderClasses[] = 'Drupal\Core\Installer\InstallerServiceProvider'; $providers[] = new InstallerServiceProvider(); return $providers;