function InlineBlockTestBase::setUp

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

Overrides BrowserTestBase::setUp

2 calls to InlineBlockTestBase::setUp()
InlineBlockPrivateFilesTest::setUp in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
WorkspacesLayoutBuilderIntegrationTest::setUp in core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php
2 methods override InlineBlockTestBase::setUp()
InlineBlockPrivateFilesTest::setUp in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
WorkspacesLayoutBuilderIntegrationTest::setUp in core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php

File

core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php, line 51

Class

InlineBlockTestBase
Base class for testing inline blocks.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalPlaceBlock('local_tasks_block');
    $this->createContentType([
        'type' => 'bundle_with_section_field',
        'new_revision' => TRUE,
    ]);
    $this->createNode([
        'type' => 'bundle_with_section_field',
        'title' => 'The node title',
        'body' => [
            [
                'value' => 'The node body',
            ],
        ],
    ]);
    $this->createNode([
        'type' => 'bundle_with_section_field',
        'title' => 'The node2 title',
        'body' => [
            [
                'value' => 'The node2 body',
            ],
        ],
    ]);
    $this->createBlockContentType('basic', 'Basic block');
    $this->blockStorage = $this->container
        ->get('entity_type.manager')
        ->getStorage('block_content');
}

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