function KernelTestBase::setUp

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
  2. 10 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
  3. 8.9.x core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::setUp()
  4. 8.9.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUp()
63 methods override KernelTestBase::setUp()
AccessTest::setUp in core/modules/file/tests/src/Kernel/AccessTest.php
BooleanFormatterTest::setUp in core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php
ClassyTest::setUp in core/themes/classy/tests/src/Kernel/ClassyTest.php
ConfigEntityNormalizeTest::setUp in core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php
ContentEntityTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php

... See full list

File

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

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

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

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