You are here

class TermMergerDummy in Term Merge 8

Dummy TermMerger class used for testing purposes.

Hierarchy

Expanded class hierarchy of TermMergerDummy

1 file declares its use of TermMergerDummy
MergeTermsConfirmTest.php in tests/src/Kernel/Form/MergeTermsConfirmTest.php

File

tests/src/Kernel/TestDoubles/TermMergerDummy.php, line 12

Namespace

Drupal\Tests\term_merge\Kernel\TestDoubles
View source
class TermMergerDummy implements TermMergerInterface {

  /**
   * {@inheritdoc}
   */
  public function mergeIntoNewTerm(array $termsToMerge, $newTermLabel) {
    return new Term([], 'taxonomy_term');
  }

  /**
   * {@inheritdoc}
   */
  public function mergeIntoTerm(array $termsToMerge, TermInterface $targetTerm) {

    // Deliberately left empty because dummies don't do anything.
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TermMergerDummy::mergeIntoNewTerm public function Merges two or more terms into a new term. Overrides TermMergerInterface::mergeIntoNewTerm 1
TermMergerDummy::mergeIntoTerm public function Merges one or more terms into an existing term. Overrides TermMergerInterface::mergeIntoTerm 1