You are here

public function SectionRenderTest::testToRenderArrayEmpty in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php \Drupal\Tests\layout_builder\Unit\SectionRenderTest::testToRenderArrayEmpty()
  2. 10 core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php \Drupal\Tests\layout_builder\Unit\SectionRenderTest::testToRenderArrayEmpty()

@covers ::toRenderArray

File

core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php, line 231

Class

SectionRenderTest
@coversDefaultClass \Drupal\layout_builder\Section @group layout_builder

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testToRenderArrayEmpty() {
  $section = [];
  $expected = [];
  $result = (new Section('layout_onecol', [], $section))
    ->toRenderArray();
  $this
    ->assertEquals($expected, $result);
}