protected function LayoutBuilderNestedFormUiTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderNestedFormUiTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ layout_builder/ tests/ src/ FunctionalJavascript/ LayoutBuilderNestedFormUiTest.php, line 43
Class
- LayoutBuilderNestedFormUiTest
- Tests placing blocks containing forms in theLayout Builder UI.
Namespace
Drupal\Tests\layout_builder\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
$this
->drupalPlaceBlock('local_tasks_block');
// Create a separate node to add a form block to, respectively.
// - Block with form api form will be added to first node layout.
// - Block with inline template with <form> tag added to second node layout.
// - Views block exposed form added to third node layout.
$this
->createContentType([
'type' => 'bundle_with_section_field',
'name' => 'Bundle with section field',
]);
for ($i = 1; $i <= count(static::FORM_BLOCK_LABELS); $i++) {
$this
->createNode([
'type' => 'bundle_with_section_field',
'title' => "Node {$i} title",
]);
}
}