protected function TextFormatterTest::setUp in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/text/src/Tests/Formatter/TextFormatterTest.php \Drupal\text\Tests\Formatter\TextFormatterTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides EntityUnitTestBase::setUp
File
- core/
modules/ text/ src/ Tests/ Formatter/ TextFormatterTest.php, line 44 - Contains \Drupal\text\Tests\Formatter\TextFormatterTest.
Class
- TextFormatterTest
- Tests the text formatters functionality.
Namespace
Drupal\text\Tests\FormatterCode
protected function setUp() {
parent::setUp();
entity_create('filter_format', array(
'format' => 'my_text_format',
'name' => 'My text format',
'filters' => array(
'filter_autop' => array(
'module' => 'filter',
'status' => TRUE,
),
),
))
->save();
entity_create('field_storage_config', array(
'field_name' => 'formatted_text',
'entity_type' => $this->entityType,
'type' => 'text',
'settings' => array(),
))
->save();
entity_create('field_config', array(
'entity_type' => $this->entityType,
'bundle' => $this->bundle,
'field_name' => 'formatted_text',
'label' => 'Filtered text',
))
->save();
}