public function TermTranslationUITest::testTranslationUI in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php \Drupal\Tests\taxonomy\Functional\TermTranslationUITest::testTranslationUI()
- 9 core/modules/taxonomy/tests/src/Functional/TermTranslationUITest.php \Drupal\Tests\taxonomy\Functional\TermTranslationUITest::testTranslationUI()
File
- core/
modules/ taxonomy/ tests/ src/ Functional/ TermTranslationUITest.php, line 105
Class
- TermTranslationUITest
- Tests the Term Translation UI.
Namespace
Drupal\Tests\taxonomy\FunctionalCode
public function testTranslationUI() {
parent::testTranslationUI();
// Make sure that no row was inserted for taxonomy vocabularies which do
// not have translations enabled.
$tids = \Drupal::entityQueryAggregate('taxonomy_term')
->accessCheck(FALSE)
->aggregate('tid', 'COUNT')
->condition('vid', $this->bundle, '<>')
->groupBy('tid')
->execute();
foreach ($tids as $tid) {
$this
->assertTrue($tid['tid_count'] < 2, 'Term does have translations.');
}
}