public function DefaultsSectionStorageTest::testConfigInstall in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/Kernel/DefaultsSectionStorageTest.php \Drupal\Tests\layout_builder\Kernel\DefaultsSectionStorageTest::testConfigInstall()
Tests installing defaults via config install.
File
- core/
modules/ layout_builder/ tests/ src/ Kernel/ DefaultsSectionStorageTest.php, line 66
Class
- DefaultsSectionStorageTest
- @coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testConfigInstall() {
/** @var \Drupal\layout_builder\Entity\LayoutEntityDisplayInterface $display */
$display = LayoutBuilderEntityViewDisplay::load('entity_test.bundle_with_extra_fields.default');
$section = $display
->getSection(0);
$this
->assertInstanceOf(Section::class, $section);
$this
->assertEquals('layout_twocol_section', $section
->getLayoutId());
$this
->assertEquals([
'column_widths' => '50-50',
'label' => '',
], $section
->getLayoutSettings());
}