public function TermMergerMock::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 TermMergerDummy::mergeIntoNewTerm
1 call to TermMergerMock::mergeIntoNewTerm()
- TermMergerSpy::mergeIntoNewTerm in tests/
src/ Kernel/ TestDoubles/ TermMergerSpy.php - Merges two or more terms into a new term.
1 method overrides TermMergerMock::mergeIntoNewTerm()
- TermMergerSpy::mergeIntoNewTerm in tests/
src/ Kernel/ TestDoubles/ TermMergerSpy.php - Merges two or more terms into a new term.
File
- tests/
src/ Kernel/ TestDoubles/ TermMergerMock.php, line 15
Class
- TermMergerMock
- Term merger mock class used for testing purposes.
Namespace
Drupal\Tests\term_merge\Kernel\TestDoublesCode
public function mergeIntoNewTerm(array $termsToMerge, $newTermLabel) {
return new Term([], 'taxonomy_term');
}