private function ReferenceFinderTest::setUpReferencingVocabulary in Term reference change 8
Set up a vocabulary for testing purposes.
1 call to ReferenceFinderTest::setUpReferencingVocabulary()
- ReferenceFinderTest::setUp in tests/
src/ Kernel/ ReferenceFinderTest.php
File
- tests/
src/ Kernel/ ReferenceFinderTest.php, line 131
Class
- ReferenceFinderTest
- Tests entities referencing a term are found.
Namespace
Drupal\Tests\term_reference_change\KernelCode
private function setUpReferencingVocabulary() {
$this->referencingVocabulary = $this
->createVocabulary();
$entityType = 'taxonomy_term';
$bundle = $this->referencingVocabulary
->id();
$fieldName = 'field_terms';
$fieldLabel = 'Terms';
$targetEntityType = 'taxonomy_term';
$this
->createEntityReferenceField($entityType, $bundle, $fieldName, $fieldLabel, $targetEntityType);
}