You are here

public function SectionListTraitTest::testAddBlankSection in Drupal 8

Same name and namespace in other branches
  1. 9 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()

@covers ::addBlankSection

File

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

Class

SectionListTraitTest
@coversDefaultClass \Drupal\layout_builder\SectionStorage\SectionStorageTrait

Namespace

Drupal\Tests\layout_builder\Kernel

Code

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