function SectionListTestBase::assertSections
Same name in other branches
- 10 core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php \Drupal\Tests\layout_builder\Kernel\SectionListTestBase::assertSections()
- 11.x core/modules/layout_builder/tests/src/Kernel/SectionListTestBase.php \Drupal\Tests\layout_builder\Kernel\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
- 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
- SectionListTestBase::testRemoveAllSections in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php - @covers ::removeAllSections
- SectionListTestBase::testRemoveMultipleSections in core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php - @covers ::removeSection
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ SectionListTestBase.php, line 195
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.