You are here

public function TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Tests/TermTranslationFieldViewTest.php \Drupal\taxonomy\Tests\TermTranslationFieldViewTest::testTranslatedTaxonomyTermReferenceDisplay()

Tests if the translated taxonomy term is displayed.

File

core/modules/taxonomy/src/Tests/TermTranslationFieldViewTest.php, line 60
Contains \Drupal\taxonomy\Tests\TermTranslationFieldViewTest.

Class

TermTranslationFieldViewTest
Tests the translation of taxonomy terms field on nodes.

Namespace

Drupal\taxonomy\Tests

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);
}