You are here

protected function WebTestBase::initKernel in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/simpletest/src/WebTestBase.php \Drupal\simpletest\WebTestBase::initKernel()

Initializes the kernel after installation.

Parameters

\Symfony\Component\HttpFoundation\Request $request: Request object.

Return value

\Symfony\Component\DependencyInjection\ContainerInterface The container.

2 calls to WebTestBase::initKernel()
UpdatePathTestBase::setUp in core/modules/system/src/Tests/Update/UpdatePathTestBase.php
Overrides WebTestBase::setUp() for update testing.
WebTestBase::setUp in core/modules/simpletest/src/WebTestBase.php
Sets up a Drupal site for running functional and integration tests.

File

core/modules/simpletest/src/WebTestBase.php, line 1002
Contains \Drupal\simpletest\WebTestBase.

Class

WebTestBase
Test case for typical Drupal tests.

Namespace

Drupal\simpletest

Code

protected function initKernel(Request $request) {
  $this->kernel = DrupalKernel::createFromRequest($request, $this->classLoader, 'prod', TRUE);
  $this->kernel
    ->prepareLegacyRequest($request);

  // Force the container to be built from scratch instead of loaded from the
  // disk. This forces us to not accidentally load the parent site.
  return $this->kernel
    ->rebuildContainer();
}