You are here

protected function EntityHierarchyMicrositeKernelTestBase::setupEntityHierarchyField in Entity Reference Hierarchy 8.2

Same name and namespace in other branches
  1. 3.x modules/entity_hierarchy_microsite/tests/src/Kernel/EntityHierarchyMicrositeKernelTestBase.php \Drupal\Tests\entity_hierarchy_microsite\Kernel\EntityHierarchyMicrositeKernelTestBase::setupEntityHierarchyField()

Creates a new entity hierarchy field for the given bundle.

Parameters

string $entity_type_id: Entity type to add the field to.

string $bundle: Bundle of field.

string $field_name: Field name.

Overrides EntityHierarchyTestTrait::setupEntityHierarchyField

File

modules/entity_hierarchy_microsite/tests/src/Kernel/EntityHierarchyMicrositeKernelTestBase.php, line 52

Class

EntityHierarchyMicrositeKernelTestBase
Defines a base class for micro-site tests.

Namespace

Drupal\Tests\entity_hierarchy_microsite\Kernel

Code

protected function setupEntityHierarchyField($entity_type_id, $bundle, $field_name) {
  $this
    ->installConfig('node');
  $this
    ->createContentType([
    'type' => 'basic',
  ]);
  parent::setupEntityHierarchyField($entity_type_id, 'basic', $field_name);
}