You are here

protected function EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()

Updates the 'entity_test_update' entity type to revisionable and translatable.

Parameters

bool $perform_update: (optional) Whether the change should be performed by the entity definition update manager.

1 call to EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
ViewsEntitySchemaSubscriberIntegrationTest::testRevisionDataTableRename in core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
Tests that renaming revision tables adapts the views.

File

core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php, line 210

Class

EntityDefinitionTestTrait
Provides some test methods used to update existing entity definitions.

Namespace

Drupal\Tests\system\Functional\Entity\Traits

Code

protected function updateEntityTypeToRevisionableAndTranslatable($perform_update = FALSE) {
  $updated_entity_type = $this
    ->getUpdatedEntityTypeDefinition(TRUE, TRUE);
  $updated_field_storage_definitions = $this
    ->getUpdatedFieldStorageDefinitions(TRUE, TRUE);
  if ($perform_update) {
    $this->entityDefinitionUpdateManager
      ->updateFieldableEntityType($updated_entity_type, $updated_field_storage_definitions);
  }
}