You are here

private function TermMergerNodeCrudTest::setUpContentType in Term Merge 8

Set up a content type for testing purposes.

1 call to TermMergerNodeCrudTest::setUpContentType()
TermMergerNodeCrudTest::setUp in tests/src/Kernel/TermMergerNodeCrudTest.php

File

tests/src/Kernel/TermMergerNodeCrudTest.php, line 101

Class

TermMergerNodeCrudTest
Tests term merging for nodes.

Namespace

Drupal\Tests\term_merge\Kernel

Code

private function setUpContentType() {
  $bundle = 'page';
  $this
    ->createContentType([
    'type' => $bundle,
    'name' => 'Basic page',
    'display_submitted' => FALSE,
  ]);
  $entityType = 'node';
  $fieldName = 'field_terms';
  $fieldLabel = 'Terms';
  $targetEntityType = 'taxonomy_term';
  $this
    ->createEntityReferenceField($entityType, $bundle, $fieldName, $fieldLabel, $targetEntityType);
}