function KernelTestBase::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
  2. 8.9.x core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::setUp()
  3. 8.9.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
  4. 10 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
352 calls to KernelTestBase::setUp()
AccessPermissionTest::setUp in core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php
AccountTakeoverGadgetChainTest::setUp in core/tests/Drupal/KernelTests/Core/User/AccountTakeoverGadgetChainTest.php
ActionTest::setUp in core/modules/system/tests/src/Kernel/Action/ActionTest.php
AddComponentTest::setUp in core/modules/layout_builder/tests/src/Kernel/Plugin/ConfigAction/AddComponentTest.php
AdminAccountSwitcherTest::setUp in core/tests/Drupal/KernelTests/Core/DefaultContent/AdminAccountSwitcherTest.php

... See full list

431 methods override KernelTestBase::setUp()
AccessPermissionTest::setUp in core/modules/user/tests/src/Kernel/Views/AccessPermissionTest.php
AccessTest::setUp in core/modules/file/tests/src/Kernel/AccessTest.php
AccountTakeoverGadgetChainTest::setUp in core/tests/Drupal/KernelTests/Core/User/AccountTakeoverGadgetChainTest.php
ActionTest::setUp in core/modules/system/tests/src/Kernel/Action/ActionTest.php
AddComponentTest::setUp in core/modules/layout_builder/tests/src/Kernel/Plugin/ConfigAction/AddComponentTest.php

... See full list

File

core/tests/Drupal/KernelTests/KernelTestBase.php, line 225

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

protected function setUp() : void {
  parent::setUp();
  // Allow tests to compare MarkupInterface objects via assertEquals().
  $this->registerComparator(new MarkupInterfaceComparator());
  $this->root = static::getDrupalRoot();
  chdir($this->root);
  $this->initFileCache();
  $this->bootEnvironment();
  $this->bootKernel();
}

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