function LayoutBuilderEntityViewDisplayTest::testSetOverridable
Same name in other branches
- 9 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testSetOverridable()
- 8.9.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testSetOverridable()
- 11.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testSetOverridable()
Tests that setting overridable enables Layout Builder only when TRUE.
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderEntityViewDisplayTest.php, line 83
Class
- LayoutBuilderEntityViewDisplayTest
- @coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testSetOverridable() : void {
// Disable Layout Builder.
$this->sectionList
->disableLayoutBuilder();
// Set Overridable to TRUE and ensure Layout Builder is enabled.
$this->sectionList
->setOverridable();
$this->assertTrue($this->sectionList
->isLayoutBuilderEnabled());
// Ensure Layout Builder is still enabled after setting Overridable to FALSE.
$this->sectionList
->setOverridable(FALSE);
$this->assertTrue($this->sectionList
->isLayoutBuilderEnabled());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.