protected function LayoutSectionTest::createSectionNode in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php \Drupal\Tests\layout_builder\Functional\LayoutSectionTest::createSectionNode()
Creates a node with a section field.
Parameters
array $section_values: An array of values for a section field.
Return value
\Drupal\node\NodeInterface The node object.
3 calls to LayoutSectionTest::createSectionNode()
- LayoutSectionTest::testLayoutPageTitle in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php - Ensures that the entity title is displayed.
- LayoutSectionTest::testLayoutSectionFormatter in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php - Tests layout_section formatter output.
- LayoutSectionTest::testLayoutSectionFormatterAccess in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php - Tests the access checking of the section formatter.
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php, line 326
Class
- LayoutSectionTest
- Tests the rendering of a layout section field.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
protected function createSectionNode(array $section_values) {
return $this
->createNode([
'type' => 'bundle_with_section_field',
'title' => 'The node title',
'body' => [
[
'value' => 'The node body',
],
],
OverridesSectionStorage::FIELD_NAME => $section_values,
]);
}