function KernelTestBase::setUpEnvironment
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::setUpEnvironment()
Sets up the environment shared by every test method in this class.
Runs once per test class instead of once per test method, and only when the shared environment has to be built. Does nothing by default.
Must be deterministic: what this creates is reused by every test method.
See also
\Drupal\TestTools\Attribute\ShareEnvironment
1 call to KernelTestBase::setUpEnvironment()
- KernelTestBase::bootKernel in core/
tests/ Drupal/ KernelTests/ KernelTestBase.php - Bootstraps a kernel for a test.
3 methods override KernelTestBase::setUpEnvironment()
- ConfigEntityValidationTestBase::setUpEnvironment in core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigEntityValidationTestBase.php - Sets up the environment shared by every test method in this class.
- SharedDatabaseStateTest::setUpEnvironment in core/
tests/ Drupal/ KernelTests/ SharedDatabaseStateTest.php - Sets up the environment shared by every test method in this class.
- SharedDatabaseStateViolationTest::setUpEnvironment in core/
tests/ Drupal/ KernelTests/ SharedDatabaseStateViolationTest.php - Sets up the environment shared by every test method in this class.
File
-
core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 420
Class
- KernelTestBase
- Base class for functional integration tests.
Namespace
Drupal\KernelTestsCode
protected function setUpEnvironment() : void {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.