You are here

protected function LayoutBuilderOptInTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 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',
  ]));
}