You are here

public function SectionListTestBase::testRemoveAllSections in Drupal 9

@covers ::removeAllSections

@dataProvider providerTestRemoveAllSections

File

core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php, line 130

Class

SectionListTestBase
Provides a base class for testing implementations of a section list.

Namespace

Drupal\Tests\layout_builder\Kernel

Code

public function testRemoveAllSections($set_blank, $expected) {
  if ($set_blank === NULL) {
    $this->sectionList
      ->removeAllSections();
  }
  else {
    $this->sectionList
      ->removeAllSections($set_blank);
  }
  $this
    ->assertSections($expected);
}