public function TermMergerTermCrudTest::existingTermMustBeInSameVocabularyAsMergedTerms in Term Merge 8
Tests the validation for the target term being in the same vocabulary.
File
- tests/
src/ Kernel/ TermMergerTermCrudTest.php, line 99
Class
- TermMergerTermCrudTest
- Tests term merging for taxonomy terms.
Namespace
Drupal\Tests\term_merge\KernelCode
public function existingTermMustBeInSameVocabularyAsMergedTerms() {
$this
->expectException('\\RuntimeException', 'The target term must be in the same vocabulary as the terms being merged');
$sut = $this
->createSubjectUnderTest();
$term = $this
->createTerm($this
->createVocabulary());
$sut
->mergeIntoTerm($this->terms, $term);
}