function TextFormatterTest::setUp
Same name in other branches
- 9 core/modules/text/tests/src/Kernel/TextFormatterTest.php \Drupal\Tests\text\Kernel\TextFormatterTest::setUp()
- 8.9.x core/modules/text/tests/src/Kernel/TextFormatterTest.php \Drupal\Tests\text\Kernel\TextFormatterTest::setUp()
- 10 core/modules/text/tests/src/Kernel/TextFormatterTest.php \Drupal\Tests\text\Kernel\TextFormatterTest::setUp()
Overrides EntityKernelTestBase::setUp
File
-
core/
modules/ text/ tests/ src/ Kernel/ TextFormatterTest.php, line 41
Class
- TextFormatterTest
- Tests the text formatters functionality.
Namespace
Drupal\Tests\text\KernelCode
protected function setUp() : void {
parent::setUp();
FilterFormat::create([
'format' => 'my_text_format',
'name' => 'My text format',
'filters' => [
'filter_autop' => [
'module' => 'filter',
'status' => TRUE,
],
],
])->save();
FieldStorageConfig::create([
'field_name' => 'formatted_text',
'entity_type' => $this->entityType,
'type' => 'text',
'settings' => [],
])
->save();
FieldConfig::create([
'entity_type' => $this->entityType,
'bundle' => $this->bundle,
'field_name' => 'formatted_text',
'label' => 'Filtered text',
])
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.