You are here

protected function LayoutBuilderCompatibilityTestBase::installLayoutBuilder in Drupal 8

Same name and namespace in other branches
  1. 9 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()

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 91

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);
}