diff --git a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php index f748a5f2c7..6d42ed936a 100644 --- a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php +++ b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php @@ -341,7 +341,11 @@ protected function getUpdatedEntityTypeDefinition($revisionable = FALSE, $transl } $this->state->set('entity_test_update.entity_type', $entity_type); - $this->entityManager->clearCachedDefinitions(); + + $this->container->get('entity_type.manager')->clearCachedDefinitions(); + $this->container->get('entity_type.bundle.info')->clearCachedBundles(); + $this->container->get('entity_field.manager')->clearCachedFieldDefinitions(); + $this->container->get('entity_type.repository')->clearCachedDefinitions(); return $entity_type; }