You are here

protected function MigrateTaxonomyTermTest::getParentIDs in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php \Drupal\taxonomy\Tests\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/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php
Validate a migrated term contains the expected values.

File

core/modules/taxonomy/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php, line 82
Contains \Drupal\taxonomy\Tests\Migrate\d7\MigrateTaxonomyTermTest.

Class

MigrateTaxonomyTermTest
Upgrade taxonomy terms.

Namespace

Drupal\taxonomy\Tests\Migrate\d7

Code

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