You are here

protected function HalLinkManagerTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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 @group hal @group legacy

Namespace

Drupal\Tests\hal\Kernel

Code

protected function setUp() {
  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();
  \Drupal::service('router.builder')
    ->rebuild();
}