function HalLinkManagerTest::setUp

Same name and namespace in other branches
  1. 8.9.x core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php \Drupal\Tests\hal\Kernel\HalLinkManagerTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php, line 36

Class

HalLinkManagerTest
@coversDefaultClass \Drupal\hal\LinkManager\LinkManager[[api-linebreak]] @group hal @group legacy

Namespace

Drupal\Tests\hal\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->installEntitySchema('node');
  NodeType::create([
    'type' => 'page',
  ])->save();
  FieldStorageConfig::create([
    'entity_type' => 'node',
    'type' => 'entity_reference',
    'field_name' => 'field_ref',
  ])->save();
  FieldConfig::create([
    'entity_type' => 'node',
    'bundle' => 'page',
    'field_name' => 'field_ref',
  ])->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.