function DrupalKernelTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php \Drupal\KernelTests\Core\DrupalKernel\DrupalKernelTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php, line 20

Class

DrupalKernelTest
Tests DIC compilation to disk.

Namespace

Drupal\KernelTests\Core\DrupalKernel

Code

protected function setUp() {
    // DrupalKernel relies on global $config_directories and requires those
    // directories to exist. Therefore, create the directories, but do not
    // invoke KernelTestBase::setUp(), since that would set up further
    // environment aspects, which would distort this test, because it tests
    // the DrupalKernel (re-)building itself.
    $this->root = static::getDrupalRoot();
    $this->bootEnvironment();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.