You are here

protected function EntityDefinitionTestTrait::resetEntityType 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::resetEntityType()
  2. 10 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::resetEntityType()

Resets the entity type definition.

1 call to EntityDefinitionTestTrait::resetEntityType()
ViewsEntitySchemaSubscriberIntegrationTest::testVariousTableUpdates in core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
Tests a bunch possible entity definition table updates.

File

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

Class

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

Namespace

Drupal\Tests\system\Functional\Entity\Traits

Code

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