function LayoutBuilderEntityViewDisplayTest::testIsLayoutBuilderEnabled
Same name in other branches
- 9 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testIsLayoutBuilderEnabled()
- 8.9.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testIsLayoutBuilderEnabled()
- 11.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testIsLayoutBuilderEnabled()
@dataProvider providerTestIsLayoutBuilderEnabled
File
-
core/
modules/ layout_builder/ tests/ src/ Kernel/ LayoutBuilderEntityViewDisplayTest.php, line 50
Class
- LayoutBuilderEntityViewDisplayTest
- @coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay
Namespace
Drupal\Tests\layout_builder\KernelCode
public function testIsLayoutBuilderEnabled($expected, $view_mode, $enabled) : void {
$display = LayoutBuilderEntityViewDisplay::create([
'targetEntityType' => 'entity_test',
'bundle' => 'entity_test',
'mode' => $view_mode,
'status' => TRUE,
'third_party_settings' => [
'layout_builder' => [
'enabled' => $enabled,
],
],
]);
$result = $display->isLayoutBuilderEnabled();
$this->assertSame($expected, $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.