protected function LayoutBuilderPrepareLayoutTest::setUp in Drupal 9
Overrides BrowserTestBase::setUp
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderPrepareLayoutTest.php, line 32
Class
- LayoutBuilderPrepareLayoutTest
- Tests the ability to alter a layout builder element while preparing.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this
->createContentType([
'type' => 'bundle_with_section_field',
]);
LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')
->enableLayoutBuilder()
->setOverridable()
->save();
$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',
],
],
]);
$this
->createNode([
'type' => 'bundle_with_section_field',
'title' => 'The third node title',
'body' => [
[
'value' => 'The third node body',
],
],
]);
}