You are here

public function HierarchicalTaxonomyMenuTranslationTest::testDynamicBlockTitle in Hierarchical Taxonomy Menu 8

Test dynamic block title.

File

tests/src/Functional/HierarchicalTaxonomyMenuTranslationTest.php, line 163

Class

HierarchicalTaxonomyMenuTranslationTest
Tests the Hierarchical Taxonomy Menu block with translated taxonomy terms.

Namespace

Drupal\Tests\hierarchical_taxonomy_menu\Functional

Code

public function testDynamicBlockTitle() {
  $this
    ->drupalGet('taxonomy/term/1');
  $block_title_element = $this
    ->getSession()
    ->getPage()
    ->find('css', '#block-hierarchicaltaxonomymenu h2');
  $this
    ->assertEqual($block_title_element
    ->getText(), 'Parent');
  $this
    ->drupalGet('sr/taxonomy/term/1');
  $block_title_element = $this
    ->getSession()
    ->getPage()
    ->find('css', '#block-hierarchicaltaxonomymenu h2');
  $this
    ->assertEqual($block_title_element
    ->getText(), 'Roditelj');
}