function AjaxBlockTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php, line 41

Class

AjaxBlockTest
Ajax blocks tests.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    // @todo The Layout Builder UI relies on local tasks; fix in
    //   https://www.drupal.org/project/drupal/issues/2917777.
    $this->drupalPlaceBlock('local_tasks_block');
    $this->drupalLogin($this->drupalCreateUser([
        'configure any layout',
    ]));
    $this->createContentType([
        'type' => 'bundle_with_section_field',
    ]);
    LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')->enableLayoutBuilder()
        ->setOverridable()
        ->save();
}

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