protected function HtmlTitleFormatterTest::setUp in HTML Title 8
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ HtmlTitleFormatterTest.php, line 69
Class
- HtmlTitleFormatterTest
- Test the HTML Title formatter.
Namespace
Drupal\Tests\html_title\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installConfig([
'field',
'html_title',
]);
$this
->installEntitySchema('entity_test');
FieldStorageConfig::create([
'field_name' => $this->fieldName,
'type' => 'string',
'entity_type' => $this->entityTypeId,
'cardinality' => 1,
])
->save();
FieldConfig::create([
'entity_type' => $this->entityTypeId,
'field_name' => $this->fieldName,
'bundle' => $this->bundle,
'label' => 'Test text-field',
])
->save();
$this->entityTypeManager = $this->container
->get('entity_type.manager');
$this->entityDisplayRepository = $this->container
->get('entity_display.repository');
}