You are here

protected function LinkItemNormalizerTest::setUp in Replication 8.2

Overrides NormalizerTestBase::setUp

File

tests/src/Unit/Normalizer/LinkItemNormalizerTest.php, line 19

Class

LinkItemNormalizerTest
Tests the link serialization format.

Namespace

Drupal\Tests\replication\Unit\Normalizer

Code

protected function setUp() {
  parent::setUp();

  // Create a Link field for testing.
  FieldStorageConfig::create([
    'field_name' => 'field_test_link',
    'entity_type' => 'entity_test_mulrev',
    'type' => 'link',
    'cardinality' => 2,
    'translatable' => FALSE,
  ])
    ->save();
  FieldConfig::create([
    'entity_type' => 'entity_test_mulrev',
    'field_name' => 'field_test_link',
    'bundle' => 'entity_test_mulrev',
    'label' => 'Test link-field',
    'widget' => [
      'type' => 'link',
      'weight' => 0,
    ],
  ])
    ->save();
}