summaryrefslogtreecommitdiffstats
path: root/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php')
-rw-r--r--core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
index 079a220..ad94e14 100644
--- a/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php
@@ -231,6 +231,7 @@ class SectionRenderTest extends UnitTestCase {
* @covers ::toRenderArray
*/
public function testContextAwareBlock() {
+ $block_content = ['#markup' => 'The block content.'];
$render_array = [
'#theme' => 'block',
'#weight' => 0,
@@ -238,7 +239,7 @@ class SectionRenderTest extends UnitTestCase {
'#plugin_id' => 'block_plugin_id',
'#base_plugin_id' => 'block_plugin_id',
'#derivative_plugin_id' => NULL,
- 'content' => [],
+ 'content' => $block_content,
'#cache' => [
'contexts' => [],
'tags' => [],
@@ -251,7 +252,7 @@ class SectionRenderTest extends UnitTestCase {
$access_result = AccessResult::allowed();
$block->access($this->account->reveal(), TRUE)->willReturn($access_result);
- $block->build()->willReturn([]);
+ $block->build()->willReturn($block_content);
$block->getCacheContexts()->willReturn([]);
$block->getCacheTags()->willReturn([]);
$block->getCacheMaxAge()->willReturn(Cache::PERMANENT);