function LinkSeparateFormatterDisplayTest::setUp

Set the default field storage backend for fields created during tests.

Overrides FieldKernelTestBase::setUp

File

core/modules/link/tests/src/Kernel/LinkSeparateFormatterDisplayTest.php, line 36

Class

LinkSeparateFormatterDisplayTest
Tests the 'link_separate' field formatter.

Namespace

Drupal\Tests\link\Kernel

Code

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.