function SectionListTraitTest::testAddBlankSection

Same name and namespace in other branches
  1. 11.x core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest::testAddBlankSection()
  2. 10 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest::testAddBlankSection()
  3. 9 core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest::testAddBlankSection()
  4. 8.9.x core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php \Drupal\Tests\layout_builder\Kernel\SectionListTraitTest::testAddBlankSection()

Tests add blank section.

File

core/modules/layout_builder/tests/src/Kernel/SectionListTraitTest.php, line 32

Class

SectionListTraitTest
Tests Drupal\layout_builder\SectionListTrait.

Namespace

Drupal\Tests\layout_builder\Kernel

Code

public function testAddBlankSection() : void {
  $this->expectException(\Exception::class);
  $this->expectExceptionMessage('A blank section must only be added to an empty list');
  $this->sectionList
    ->addBlankSection();
}

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