protected function initKernel(Request
$request) { $this->kernel = DrupalKernel::
createFromRequest($request,
$this->classLoader, 'prod', TRUE
);
$this->kernel->
boot();
// Add our request to the stack and route context.
$request->attributes->
set(RouteObjectInterface::ROUTE_OBJECT,
new Route('<none>'
));
$request->attributes->
set(RouteObjectInterface::ROUTE_NAME, '<none>'
);
$this->kernel->
preHandle($request);
return $this->kernel->
getContainer();
} /**
* Installs the default theme defined by `static::$defaultTheme` when needed.
*
* To install a test theme outside of the testing environment, add
* @code
* $settings['extension_discovery_scan_tests'] = TRUE;
* @endcode
* to your settings.php.
*
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The container.
*
* @throws \Exception
* If the test case does not initialize default theme.
*/