You are here

protected function BlockViewBuilderTest::getBlockRenderArray in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php \Drupal\Tests\block\Kernel\BlockViewBuilderTest::getBlockRenderArray()

Get a fully built render array for a block.

Return value

array The render array.

4 calls to BlockViewBuilderTest::getBlockRenderArray()
BlockViewBuilderTest::assertBlockRenderedWithExpectedCacheability in core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
Asserts that a block is built/rendered/cached with expected cacheability.
BlockViewBuilderTest::testBlockViewBuilderBuildAlter in core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
Tests block build altering.
BlockViewBuilderTest::testBlockViewBuilderViewAlter in core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
Tests block view altering.
BlockViewBuilderTest::verifyRenderCacheHandling in core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
Verifies render cache handling of the block being tested.

File

core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php, line 324

Class

BlockViewBuilderTest
Tests the block view builder.

Namespace

Drupal\Tests\block\Kernel

Code

protected function getBlockRenderArray() {
  return $this->container
    ->get('entity_type.manager')
    ->getViewBuilder('block')
    ->view($this->block, 'block');
}