public function HierarchicalTaxonomyMenuImageTest::testBlockImagesDisabled in Hierarchical Taxonomy Menu 8
Tests that images are not displayed.
File
- tests/
src/ Functional/ HierarchicalTaxonomyMenuImageTest.php, line 187
Class
- HierarchicalTaxonomyMenuImageTest
- Tests the Hierarchical Taxonomy Menu images.
Namespace
Drupal\Tests\hierarchical_taxonomy_menu\FunctionalCode
public function testBlockImagesDisabled() {
$this->block
->set('settings', [
'label' => 'Hierarchical Taxonomy Menu',
'label_display' => 'visible',
'vocabulary' => $this->vocabulary
->id() . '|',
'collapsible' => FALSE,
])
->save();
$this
->drupalGet('<front>');
$block_element = $this
->getSession()
->getPage()
->find('css', '.block-taxonomymenu__menu');
$this
->assertStringContainsString('Term 1', $block_element
->getText());
$this
->assertStringContainsString('Term 2', $block_element
->getText());
$this
->assertSession()
->elementNotExists('css', '.hierarchical-taxonomy-menu li:first-child img');
$this
->assertSession()
->elementNotExists('css', '.hierarchical-taxonomy-menu li:last-child img');
}