function ConfigEntityValidationTestBase::rememberEntityUnderTest
Same name and namespace in other branches
- main core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php \Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase::rememberEntityUnderTest()
Records which entity the test methods of this class validate.
Only the process that built the shared state has the entity object. What the other processes need to reload it is stored in state, which for a shared environment is backed by the database.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigEntityValidationTestBase.php, line 136
Class
- ConfigEntityValidationTestBase
- Base class for testing validation of config entities.
Namespace
Drupal\KernelTests\Core\ConfigCode
private function rememberEntityUnderTest() : void {
\Drupal::keyValue(static::class)->set(self::ENTITY_UNDER_TEST, [
$this->entity
->getEntityTypeId(),
$this->entity
->id(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.