You are here

protected function BlockViewBuilderTest::getBlockRenderArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Tests/BlockViewBuilderTest.php \Drupal\block\Tests\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/src/Tests/BlockViewBuilderTest.php
Asserts that a block is built/rendered/cached with expected cacheability.
BlockViewBuilderTest::testBlockViewBuilderBuildAlter in core/modules/block/src/Tests/BlockViewBuilderTest.php
Tests block build altering.
BlockViewBuilderTest::testBlockViewBuilderViewAlter in core/modules/block/src/Tests/BlockViewBuilderTest.php
Tests block view altering.
BlockViewBuilderTest::verifyRenderCacheHandling in core/modules/block/src/Tests/BlockViewBuilderTest.php
Verifies render cache handling of the block being tested.

File

core/modules/block/src/Tests/BlockViewBuilderTest.php, line 329
Contains \Drupal\block\Tests\BlockViewBuilderTest.

Class

BlockViewBuilderTest
Tests the block view builder.

Namespace

Drupal\block\Tests

Code

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