function SectionListTestBase::assertSections
Asserts that the field list has the expected sections.
Parameters
\Drupal\layout_builder\Section[] $expected: The expected sections.
6 calls to SectionListTestBase::assertSections()
- SectionListTestBase::testAppendSection in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php  - @covers ::appendSection[[api-linebreak]]
 - SectionListTestBase::testGetSections in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php  - Tests ::getSections().
 - SectionListTestBase::testInsertSection in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php  - @covers ::insertSection[[api-linebreak]]
 - SectionListTestBase::testRemoveAllSections in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php  - @covers ::removeAllSections[[api-linebreak]]
 - SectionListTestBase::testRemoveMultipleSections in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php  - @covers ::removeSection[[api-linebreak]]
 
File
- 
              core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php, line 199  
Class
- SectionListTestBase
 - Provides a base class for testing implementations of a section list.
 
Namespace
Drupal\Tests\layout_builder\KernelCode
protected function assertSections(array $expected) {
  $result = $this->sectionList
    ->getSections();
  $this->assertEquals($expected, $result);
  $this->assertSame(array_keys($expected), array_keys($result));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.