protected function EntitySchemaTest::updateEntityType in Drupal 8
Same name and namespace in other branches
- 9 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 77
Class
- EntitySchemaTest
- Tests the default entity storage schema handler.
Namespace
Drupal\KernelTests\Core\EntityCode
protected function updateEntityType($alter) {
$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);
}