You are here

public function HierarchicalTaxonomyMenuBasicTest::testDynamicBlockTitleEnabled in Hierarchical Taxonomy Menu 8

Test dynamic block title enabled.

File

tests/src/FunctionalJavascript/HierarchicalTaxonomyMenuBasicTest.php, line 197

Class

HierarchicalTaxonomyMenuBasicTest
Tests the Hierarchical Taxonomy Menu basic config options.

Namespace

Drupal\Tests\hierarchical_taxonomy_menu\FunctionalJavascript

Code

public function testDynamicBlockTitleEnabled() {
  $this->block
    ->set('settings', [
    'label' => 'Hierarchical Taxonomy Menu',
    'label_display' => 'visible',
    'vocabulary' => $this->vocabulary
      ->id() . '|',
    'dynamic_block_title' => TRUE,
  ]);
  $this->block
    ->save();
  $this
    ->drupalGet('taxonomy/term/1');
  $block_title_element = $this
    ->getSession()
    ->getPage()
    ->find('css', '#block-hierarchicaltaxonomymenu h2');
  $this
    ->assertEqual($block_title_element
    ->getText(), 'Parent term 1');
}