function LayoutBuilderTest::setUp
Same name in this branch
- 8.9.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderTest::setUp()
Same name in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::setUp()
- 9 core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderTest::setUp()
- 10 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::setUp()
- 11.x core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderTest.php, line 56
Class
- LayoutBuilderTest
- Tests the Layout Builder UI.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('local_tasks_block');
$bundle = BlockContentType::create([
'id' => 'basic',
'label' => 'Basic',
]);
$bundle->save();
block_content_add_body_field($bundle->id());
BlockContent::create([
'info' => 'My custom block',
'type' => 'basic',
'body' => [
[
'value' => 'This is the block content',
'format' => filter_default_format(),
],
],
])->save();
$this->createContentType([
'type' => 'bundle_with_section_field',
]);
$this->node = $this->createNode([
'type' => 'bundle_with_section_field',
'title' => 'The node title',
'body' => [
[
'value' => 'The node body',
],
],
]);
$this->drupalLogin($this->drupalCreateUser([
'access contextual links',
'configure any layout',
'administer node display',
], 'foobar'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.