You are here

private function TermMergerTermCrudTest::createSubjectUnderTest in Term Merge 8

Creates the class used for merging terms.

Return value

\Drupal\term_merge\TermMerger The class used for merging terms

6 calls to TermMergerTermCrudTest::createSubjectUnderTest()
TermMergerTermCrudTest::canOnlyMergeTermsInTheSameVocabulary in tests/src/Kernel/TermMergerTermCrudTest.php
Tests only taxonomy terms in the same vocabulary can be merged.
TermMergerTermCrudTest::existingTermMustBeInSameVocabularyAsMergedTerms in tests/src/Kernel/TermMergerTermCrudTest.php
Tests the validation for the target term being in the same vocabulary.
TermMergerTermCrudTest::mergedTermsAreDeleted in tests/src/Kernel/TermMergerTermCrudTest.php
Tests the merged terms are deleted after the migration.
TermMergerTermCrudTest::mergeIntoNewTermCreatesNewTerm in tests/src/Kernel/TermMergerTermCrudTest.php
Tests a newly created term is available when merging to a new term.
TermMergerTermCrudTest::mergeIntoTermSavesTermIfNewTermIsPassedIn in tests/src/Kernel/TermMergerTermCrudTest.php
Tests a taxonomy term that is passed to the migration is saved correctly.

... See full list

File

tests/src/Kernel/TermMergerTermCrudTest.php, line 155

Class

TermMergerTermCrudTest
Tests term merging for taxonomy terms.

Namespace

Drupal\Tests\term_merge\Kernel

Code

private function createSubjectUnderTest() {
  $migrator = \Drupal::service('term_reference_change.migrator');
  $dispatcher = \Drupal::service('event_dispatcher');
  $sut = new TermMerger($this->entityTypeManager, $migrator, $dispatcher);
  return $sut;
}