function TermTranslationTest::getLeafTerm

Same name in other branches
  1. 9 core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php \Drupal\Tests\taxonomy\Functional\TermTranslationTest::getLeafTerm()
  2. 10 core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php \Drupal\Tests\taxonomy\Functional\TermTranslationTest::getLeafTerm()
  3. 11.x core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php \Drupal\Tests\taxonomy\Functional\TermTranslationTest::getLeafTerm()

Get the final (leaf) term in the hierarchy.

Return value

\Drupal\taxonomy\Entity\Term The final term in the hierarchy.

1 call to TermTranslationTest::getLeafTerm()
TermTranslationTest::testTranslatedBreadcrumbs in core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php
Test translated breadcrumbs.

File

core/modules/taxonomy/tests/src/Functional/TermTranslationTest.php, line 151

Class

TermTranslationTest
Tests for proper breadcrumb translation.

Namespace

Drupal\Tests\taxonomy\Functional

Code

protected function getLeafTerm() {
    return $this->terms[count($this->termTranslationMap) - 1];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.