function SectionListTestBase::testRemoveAllSections

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

@covers ::removeAllSections

@dataProvider providerTestRemoveAllSections

File

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

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) : void {
    if ($set_blank === NULL) {
        $this->sectionList
            ->removeAllSections();
    }
    else {
        $this->sectionList
            ->removeAllSections($set_blank);
    }
    $this->assertSections($expected);
}

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