function LayoutBuilderQuickEditTest::setUp

Same name in this branch
  1. 9 core/modules/quickedit/tests/src/Functional/LayoutBuilderQuickEditTest.php \Drupal\Tests\quickedit\Functional\LayoutBuilderQuickEditTest::setUp()
Same name in other branches
  1. 8.9.x core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderQuickEditTest::setUp()
  2. 8.9.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderQuickEditTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderQuickEditTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php, line 66

Class

LayoutBuilderQuickEditTest
Tests that Layout Builder functions with Quick Edit.

Namespace

Drupal\Tests\quickedit\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('page_title_block');
    // Create the Article node type.
    $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
    $this->article = $this->drupalCreateNode([
        'type' => 'article',
        'title' => 'My Test Node',
        'body' => [
            'value' => 'Hello Layout Builder!',
            'format' => 'plain_text',
        ],
    ]);
    // Log in as a content author who can use Quick Edit and edit Articles.
    $this->contentAuthorUser = $this->drupalCreateUser([
        'access contextual links',
        'access in-place editing',
        'access content',
        'edit any article content',
    ]);
    $this->drupalLogin($this->contentAuthorUser);
}

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