You are here

public function LinkItemTest::setUp in Tome 8

Overrides TestBase::setUp

File

modules/tome_sync/tests/src/Kernel/LinkItemTest.php, line 32

Class

LinkItemTest
Tests that the link item normalization works.

Namespace

Drupal\Tests\tome_sync\Kernel

Code

public function setUp() {
  parent::setUp();
  $this
    ->installSchema('tome_sync', [
    'tome_sync_content_hash',
  ]);
  $this
    ->installEntitySchema('path_alias');
  FieldStorageConfig::create([
    'entity_type' => 'node',
    'field_name' => 'field_link',
    'type' => 'link',
  ])
    ->save();
  FieldConfig::create([
    'entity_type' => 'node',
    'field_name' => 'field_link',
    'bundle' => 'article',
    'settings' => [
      'link_type' => LinkItemInterface::LINK_GENERIC,
    ],
  ])
    ->save();
}