public function TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php \Drupal\Tests\taxonomy\Functional\TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay()
- 10 core/modules/taxonomy/tests/src/Functional/TermTranslationFieldViewTest.php \Drupal\Tests\taxonomy\Functional\TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay()
Tests if the translated taxonomy term is displayed.
File
- core/
modules/ taxonomy/ tests/ src/ Functional/ TermTranslationFieldViewTest.php, line 62
Class
- TermTranslationFieldViewTest
- Tests the translation of taxonomy terms field on nodes.
Namespace
Drupal\Tests\taxonomy\FunctionalCode
public function testTranslatedTaxonomyTermReferenceDisplay() {
$path = 'node/' . $this->node
->id();
$translation_path = $this->translateToLangcode . '/' . $path;
$this
->drupalGet($path);
$this
->assertSession()
->pageTextNotContains($this->translatedTagName);
$this
->assertSession()
->pageTextContains($this->baseTagName);
$this
->drupalGet($translation_path);
$this
->assertSession()
->pageTextContains($this->translatedTagName);
$this
->assertSession()
->pageTextNotContains($this->baseTagName);
}