function EntitySchemaTest::updateEntityType
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::updateEntityType()
- 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::updateEntityType()
- 10 core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php \Drupal\KernelTests\Core\Entity\EntitySchemaTest::updateEntityType()
Updates the entity type definition.
Parameters
bool $alter: Whether the original definition should be altered or not.
2 calls to EntitySchemaTest::updateEntityType()
- EntitySchemaTest::testEntitySchemaUpdate in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntitySchemaTest.php - Tests that entity schema responds to changes in the entity type definition.
- EntitySchemaTest::testModifyingTranslatableColumnSchema in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntitySchemaTest.php - Tests that modifying the UUID field for a translatable entity works.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntitySchemaTest.php, line 93
Class
- EntitySchemaTest
- Tests the default entity storage schema handler.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function updateEntityType($alter) : void {
$this->state
->set('entity_schema_update', $alter);
$updated_entity_type = $this->getUpdatedEntityTypeDefinition($alter, $alter);
$updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions($alter, $alter);
$this->container
->get('entity.definition_update_manager')
->updateFieldableEntityType($updated_entity_type, $updated_field_storage_definitions);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.