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()
- 10 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 set to TRUE.
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderEntityViewDisplayTest.php, line 100
Class
- LayoutBuilderEntityViewDisplayTest
- @coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testSetOverridable() {
// Disable Layout Builder.
$this->sectionStorage
->disableLayoutBuilder();
// Set Overridable to TRUE and ensure Layout Builder is enabled.
$this->sectionStorage
->setOverridable();
$this->assertEquals($this->sectionStorage
->isLayoutBuilderEnabled(), TRUE);
// Ensure Layout Builder is still enabled after setting Overridable to FALSE.
$this->sectionStorage
->setOverridable(FALSE);
$this->assertEquals($this->sectionStorage
->isLayoutBuilderEnabled(), TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.