function BlockViewBuilderTest::getBlockRenderArray

Same name and namespace in other branches
  1. 11.x 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.

File

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

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.