function ContentPreviewToggleTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php, line 43

Class

ContentPreviewToggleTest
Tests toggling of content preview.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    $this->createContentType([
        'type' => 'bundle_for_this_particular_test',
    ]);
    LayoutBuilderEntityViewDisplay::load('node.bundle_for_this_particular_test.default')->enableLayoutBuilder()
        ->setOverridable()
        ->save();
    $this->drupalLogin($this->drupalCreateUser([
        'configure any layout',
        'access contextual links',
    ]));
}

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