function LayoutBuilderCompatibilityTestBase::installLayoutBuilder

Same name in other branches
  1. 8.9.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase::installLayoutBuilder()
  2. 10 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase::installLayoutBuilder()
  3. 11.x core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase::installLayoutBuilder()

Installs the Layout Builder.

Also configures and reloads the entity display.

3 calls to LayoutBuilderCompatibilityTestBase::installLayoutBuilder()
FieldLayoutUninstallTest::testFieldLayoutUninstall in core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php
Ensures field layout can be uninstalled with layout builder enabled.
LayoutBuilderFieldLayoutCompatibilityTest::testCompatibility in core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php
Tests the compatibility of Layout Builder and Field Layout.
LayoutBuilderInstallTest::testCompatibility in core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php
Tests the compatibility of Layout Builder with existing entity displays.

File

core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php, line 90

Class

LayoutBuilderCompatibilityTestBase
Tests Layout Builder's compatibility with existing systems.

Namespace

Drupal\Tests\layout_builder\Kernel

Code

protected function installLayoutBuilder() {
    $this->container
        ->get('module_installer')
        ->install([
        'layout_builder',
    ]);
    $this->refreshServices();
    $this->display = $this->reloadEntity($this->display);
    $this->display
        ->enableLayoutBuilder()
        ->save();
    $this->entity = $this->reloadEntity($this->entity);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.