function EntityDefinitionTestTrait::resetEntityType

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::resetEntityType()
  2. 8.9.x core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php \Drupal\system\Tests\Entity\EntityDefinitionTestTrait::resetEntityType()
  3. 8.9.x core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::resetEntityType()
  4. 11.x 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 126

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.