function LayoutBuilderTestBase::setUp

Same name in other branches
  1. 10 core/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderTestBase::setUp()

Overrides BrowserTestBase::setUp

1 call to LayoutBuilderTestBase::setUp()
LayoutBuilderOverridesEditingThemeTest::setUp in core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesEditingThemeTest.php
1 method overrides LayoutBuilderTestBase::setUp()
LayoutBuilderOverridesEditingThemeTest::setUp in core/modules/layout_builder/tests/src/Functional/LayoutBuilderOverridesEditingThemeTest.php

File

core/modules/layout_builder/tests/src/Functional/LayoutBuilderTestBase.php, line 41

Class

LayoutBuilderTestBase
Tests the Layout Builder UI.

Namespace

Drupal\Tests\layout_builder\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('local_tasks_block');
    // Create two nodes.
    $this->createContentType([
        'type' => 'bundle_with_section_field',
        'name' => 'Bundle with section field',
    ]);
    $this->createNode([
        'type' => 'bundle_with_section_field',
        'title' => 'The first node title',
        'body' => [
            [
                'value' => 'The first node body',
            ],
        ],
    ]);
    $this->createNode([
        'type' => 'bundle_with_section_field',
        'title' => 'The second node title',
        'body' => [
            [
                'value' => 'The second node body',
            ],
        ],
    ]);
}

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