From 432935c87adb9aab339ea9512af4a3cd7327ae83 Mon Sep 17 00:00:00 2001 From: Jordan Clague Date: Tue, 14 Nov 2017 22:40:14 +0000 Subject: [PATCH] Drupal 8.4 broke tests unless they were run as an admin user suggesting cache issues. This fixes that error --- src/AnonymousContext.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AnonymousContext.php b/src/AnonymousContext.php index c5f86e0..4b01d1a 100644 --- a/src/AnonymousContext.php +++ b/src/AnonymousContext.php @@ -439,6 +439,7 @@ public function viewEntityWithIndex($entity_type, $index) { /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */ $entity = $this->entities[$entity_type][$index]; + $entityTypeManager->getViewBuilder($entity_type)->resetCache(); $this->visitPath($entity->toUrl()->toString()); }