protected function SectionListTestBase::assertSections in Drupal 10
Same name and namespace in other branches
- 9 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.
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));
}