function LayoutBuilderOptInTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php, line 31

Class

LayoutBuilderOptInTest
Tests the ability for opting in and out of Layout Builder.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    // Create one content type before installing Layout Builder and one after.
    $this->createContentType([
        'type' => 'before',
    ]);
    $this->container
        ->get('module_installer')
        ->install([
        'layout_builder',
    ]);
    $this->rebuildAll();
    $this->createContentType([
        'type' => 'after',
    ]);
    $this->drupalLogin($this->drupalCreateUser([
        'configure any layout',
        'administer node display',
    ]));
}

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