function BrowserTestBase::installDrupal
Same name in other branches
- 9 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::installDrupal()
- 8.9.x core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::installDrupal()
- 10 core/tests/Drupal/Tests/BrowserTestBase.php \Drupal\Tests\BrowserTestBase::installDrupal()
Installs Drupal into the test site.
1 call to BrowserTestBase::installDrupal()
- BrowserTestBase::setUp in core/
tests/ Drupal/ Tests/ BrowserTestBase.php
2 methods override BrowserTestBase::installDrupal()
- InstallerTestBase::installDrupal in core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerTestBase.php - We are testing the installer, so set up a minimal environment for that.
- UpdatePathTestBase::installDrupal in core/
tests/ Drupal/ FunctionalTests/ Update/ UpdatePathTestBase.php - Overrides BrowserTestBase::installDrupal() for update testing.
File
-
core/
tests/ Drupal/ Tests/ BrowserTestBase.php, line 543
Class
- BrowserTestBase
- Provides a test case for functional Drupal tests.
Namespace
Drupal\TestsCode
public function installDrupal() {
$this->initUserSession();
$this->prepareSettings();
$this->doInstall();
$this->initSettings();
$this->container = $container = $this->initKernel(\Drupal::request());
$this->initConfig($container);
$this->installDefaultThemeFromClassProperty($container);
$this->installModulesFromClassProperty($container);
// Clear the static cache so that subsequent cache invalidations will work
// as expected.
$this->container
->get('cache_tags.invalidator')
->resetChecksums();
// Explicitly call register() again on the container registered in \Drupal.
// @todo This should already be called through
// DrupalKernel::prepareLegacyRequest() -> DrupalKernel::boot() but that
// appears to be calling a different container.
$this->container
->get('stream_wrapper_manager')
->register();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.