protected function TextFormatterTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 42
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();
}