function LinkFormatterDisplayTest::setUp
Overrides FieldKernelTestBase::setUp
File
-
core/
modules/ link/ tests/ src/ Kernel/ LinkFormatterDisplayTest.php, line 36
Class
- LinkFormatterDisplayTest
- Tests the default 'link' field formatter.
Namespace
Drupal\Tests\link\KernelCode
protected function setUp() : void {
parent::setUp();
FieldStorageConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'type' => 'link',
])->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'bundle' => 'entity_test',
'settings' => [
'title' => DRUPAL_OPTIONAL,
'link_type' => LinkItemInterface::LINK_GENERIC,
],
])->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.