protected function EntitySchemaTest::updateEntityType in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Entity/EntitySchemaTest.php \Drupal\system\Tests\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/
modules/ system/ src/ Tests/ Entity/ EntitySchemaTest.php - Tests that entity schema responds to changes in the entity type definition.
- EntitySchemaTest::testModifyingTranslatableColumnSchema in core/
modules/ system/ src/ Tests/ Entity/ EntitySchemaTest.php - Tests that modifying the UUID field for a translatable entity works.
File
- core/
modules/ system/ src/ Tests/ Entity/ EntitySchemaTest.php, line 71 - Contains \Drupal\system\Tests\Entity\EntitySchemaTest.
Class
- EntitySchemaTest
- Tests adding a custom bundle field.
Namespace
Drupal\system\Tests\EntityCode
protected function updateEntityType($alter) {
$entity_test_id = 'entity_test';
$original = $this->entityManager
->getDefinition($entity_test_id);
$this->entityManager
->clearCachedDefinitions();
$this->state
->set('entity_schema_update', $alter);
$entity_type = $this->entityManager
->getDefinition($entity_test_id);
$this->entityManager
->onEntityTypeUpdate($entity_type, $original);
}