diff --git a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php index d976102029..81c2cc627d 100644 --- a/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php +++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php @@ -75,6 +75,7 @@ public function testOnBuildRender($refinable_dependent_access) { $layout_entity = $this->prophesize(FieldableEntityInterface::class); $layout_entity = $layout_entity->reveal(); $context = $this->prophesize(ContextInterface::class); + $context->hasContextValue()->willReturn(TRUE); $context->getContextValue()->willReturn($layout_entity); $contexts['entity'] = $context->reveal(); @@ -141,6 +142,7 @@ public function testOnBuildRenderDenied($refinable_dependent_access) { $layout_entity = $this->prophesize(FieldableEntityInterface::class); $layout_entity = $layout_entity->reveal(); $context = $this->prophesize(ContextInterface::class); + $context->hasContextValue()->willReturn(TRUE); $context->getContextValue()->willReturn($layout_entity); $contexts['entity'] = $context->reveal(); @@ -201,6 +203,7 @@ public function testOnBuildRenderInPreview($refinable_dependent_access) { $layout_entity = $layout_entity->reveal(); $layout_entity->in_preview = TRUE; $context = $this->prophesize(ContextInterface::class); + $context->hasContextValue()->willReturn(TRUE); $context->getContextValue()->willReturn($layout_entity); $contexts['entity'] = $context->reveal(); }