private function ReferenceFinderTest::setUpContentType in Term reference change 8
Set up a content type for testing purposes.
1 call to ReferenceFinderTest::setUpContentType()
- ReferenceFinderTest::setUp in tests/
src/ Kernel/ ReferenceFinderTest.php
File
- tests/
src/ Kernel/ ReferenceFinderTest.php, line 113
Class
- ReferenceFinderTest
- Tests entities referencing a term are found.
Namespace
Drupal\Tests\term_reference_change\KernelCode
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);
}