You are here

public function TermMergerSpy::mergeIntoNewTerm in Term Merge 8

Merges two or more terms into a new term.

Parameters

\Drupal\taxonomy\TermInterface[] $termsToMerge: The terms to merge.

string $newTermLabel: The label of the new term.

Return value

\Drupal\taxonomy\TermInterface The newly created term.

Overrides TermMergerMock::mergeIntoNewTerm

File

tests/src/Kernel/TestDoubles/TermMergerSpy.php, line 17

Class

TermMergerSpy
A term merge test class that keeps a list of called functions.

Namespace

Drupal\Tests\term_merge\Kernel\TestDoubles

Code

public function mergeIntoNewTerm(array $termsToMerge, $newTermLabel) {
  $this->functionCalls[__FUNCTION__] = [
    $termsToMerge,
    $newTermLabel,
  ];
  return parent::mergeIntoNewTerm($termsToMerge, $newTermLabel);
}