You are here

protected function TaxonomyTermTest::getParentIds in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/csv_example/tests/src/Kernel/Migrate/TaxonomyTermTest.php \Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate\TaxonomyTermTest::getParentIds()
  2. 3.0.x modules/csv_example/tests/src/Kernel/Migrate/TaxonomyTermTest.php \Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate\TaxonomyTermTest::getParentIds()

Retrieves the parent term IDs for a given term.

Parameters

int $tid: ID of the term to check.

Return value

array List of parent term IDs.

File

modules/csv_example/tests/src/Kernel/Migrate/TaxonomyTermTest.php, line 124

Class

TaxonomyTermTest
Upgrade taxonomy terms.

Namespace

Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate

Code

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