You are here

public function TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay in Drupal 8

Same name and namespace in other branches
  1. 9 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\Functional

Code

public function testTranslatedTaxonomyTermReferenceDisplay() {
  $path = 'node/' . $this->node
    ->id();
  $translation_path = $this->translateToLangcode . '/' . $path;
  $this
    ->drupalGet($path);
  $this
    ->assertNoText($this->translatedTagName);
  $this
    ->assertText($this->baseTagName);
  $this
    ->drupalGet($translation_path);
  $this
    ->assertText($this->translatedTagName);
  $this
    ->assertNoText($this->baseTagName);
}