X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Ftests%2Fsrc%2FFunctional%2FModerationLocaleTest.php;h=1bdbb7e461104ace7cfed5877cc9c6eb54aa4500;hb=4f1b9b4ab48a8498afac9e2213a02a23ccf4a06c;hp=28de50c535490c93bfdb4b65681f484a82c548b3;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php b/web/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php index 28de50c53..1bdbb7e46 100644 --- a/web/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php +++ b/web/core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php @@ -482,6 +482,9 @@ class ModerationLocaleTest extends ModerationStateTestBase { protected function loadTranslation(NodeInterface $node, $langcode) { /** @var \Drupal\node\NodeStorageInterface $storage */ $storage = $this->container->get('entity_type.manager')->getStorage('node'); + // Explicitly invalidate the cache for that node, as the call below is + // statically cached. + $storage->resetCache([$node->id()]); /** @var \Drupal\node\NodeInterface $node */ $node = $storage->loadRevision($storage->getLatestRevisionId($node->id())); return $node->getTranslation($langcode);