You are here

protected function MigrateTaxonomyTermTest::getParentIDs in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\d7\MigrateTaxonomyTermTest::getParentIDs()

Retrieves the parent term IDs for a given term.

Parameters

$tid: ID of the term to check.

Return value

array List of parent term IDs.

1 call to MigrateTaxonomyTermTest::getParentIDs()
MigrateTaxonomyTermTest::assertEntity in core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
Validate a migrated term contains the expected values.

File

core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php, line 216

Class

MigrateTaxonomyTermTest
Upgrade taxonomy terms.

Namespace

Drupal\Tests\taxonomy\Kernel\Migrate\d7

Code

protected function getParentIDs($tid) {
  return array_keys(\Drupal::entityTypeManager()
    ->getStorage('taxonomy_term')
    ->loadParents($tid));
}