protected function FieldTemplateLayoutBuilderTest::setup in Display Suite 8.3
Same name and namespace in other branches
- 8.4 tests/src/Functional/FieldTemplateLayoutBuilderTest.php \Drupal\Tests\ds\Functional\FieldTemplateLayoutBuilderTest::setup()
File
- tests/
src/ Functional/ FieldTemplateLayoutBuilderTest.php, line 36
Class
- FieldTemplateLayoutBuilderTest
- Tests for display of nodes and fields.
Namespace
Drupal\Tests\ds\FunctionalCode
protected function setup() {
parent::setup();
// Enable field templates.
\Drupal::configFactory()
->getEditable('ds.settings')
->set('field_template', TRUE)
->set('ft-layout-builder', TRUE)
->save();
$this
->drupalPlaceBlock('local_tasks_block');
// Create a nodes to test field_block templates on
$this
->createContentType([
'type' => 'bundle_with_section_field',
'name' => 'Bundle with section field',
]);
$this
->createNode([
'type' => 'bundle_with_section_field',
'title' => 'The first node title',
'body' => [
[
'value' => 'The first node body',
],
],
]);
}