You are here

protected function LayoutBuilderUiTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest::setUp()
  2. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest::setUp()

File

core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php, line 46

Class

LayoutBuilderUiTest
Tests the Layout Builder UI.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->createContentType([
    'type' => 'bundle_with_section_field',
  ]);
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'configure any layout',
    'create and edit custom blocks',
    'administer node display',
    'administer node fields',
    'access contextual links',
  ]));

  // Enable layout builder.
  $this
    ->drupalGet(static::FIELD_UI_PREFIX . '/display/default');
  $this
    ->submitForm([
    'layout[enabled]' => TRUE,
  ], 'Save');
}