You are here

public function TermMergerTermCrudTest::mergedTermsAreDeleted in Term Merge 8

Tests the merged terms are deleted after the migration.

@test @dataProvider mergeTermFunctionsProvider

Parameters

string $methodName: The merge method being tested.

string $target: The label for the taxonomy term target.

File

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

Class

TermMergerTermCrudTest
Tests term merging for taxonomy terms.

Namespace

Drupal\Tests\term_merge\Kernel

Code

public function mergedTermsAreDeleted($methodName, $target) {
  $sut = $this
    ->createSubjectUnderTest();
  $sut
    ->{$methodName}($this->terms, $this
    ->prepareTarget($target));
  $termStorage = $this->entityTypeManager
    ->getStorage('taxonomy_term');
  $termIds = array_keys($this->terms);
  self::assertEquals([], $termStorage
    ->loadMultiple($termIds));
}