public function HierarchicalTaxonomyMenuTest::testBlockConfigForm in Hierarchical Taxonomy Menu 8
Test the block config form integrity.
File
- tests/
src/ Functional/ HierarchicalTaxonomyMenuTest.php, line 78
Class
- HierarchicalTaxonomyMenuTest
- Tests the Hierarchical Taxonomy Menu.
Namespace
Drupal\Tests\hierarchical_taxonomy_menu\FunctionalCode
public function testBlockConfigForm() {
$this
->drupalPlaceBlock('hierarchical_taxonomy_menu', [
'region' => 'content',
'label' => 'Hierarchical Taxonomy Menu',
'id' => 'hierarchicaltaxonomymenu',
]);
$this
->drupalGet('admin/structure/block/manage/hierarchicaltaxonomymenu');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->fieldExists('settings[basic][vocabulary]');
$this
->assertSession()
->fieldExists('settings[basic][max_depth]');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '0');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '1');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '2');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '3');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '4');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '5');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '6');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '7');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '8');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '9');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '10');
$this
->assertSession()
->optionExists('edit-settings-basic-max-depth', '100');
$this
->assertSession()
->fieldExists('settings[basic][dynamic_block_title]');
$this
->assertSession()
->fieldExists('settings[basic][collapsible]');
$this
->assertSession()
->fieldExists('settings[basic][stay_open]');
$this
->assertSession()
->fieldExists('settings[basic][interactive_parent]');
$this
->assertSession()
->fieldExists('settings[basic][hide_block]');
$this
->assertSession()
->fieldExists('settings[image][use_image_style]');
$this
->assertSession()
->fieldExists('settings[image][image_style]');
$this
->assertSession()
->fieldExists('settings[image][image_height]');
$this
->assertSession()
->fieldExists('settings[image][image_width]');
$this
->assertSession()
->optionExists('edit-settings-image-image-style', 'large');
$this
->assertSession()
->optionExists('edit-settings-image-image-style', 'medium');
$this
->assertSession()
->optionExists('edit-settings-image-image-style', 'thumbnail');
$this
->assertSession()
->fieldExists('settings[advanced][max_age]');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '0');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '1800');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '3600');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '21600');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '43200');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '86400');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', '604800');
$this
->assertSession()
->optionExists('edit-settings-advanced-max-age', 'PERMANENT');
$this
->assertSession()
->fieldExists('settings[advanced][base_term]');
$this
->assertSession()
->fieldExists('settings[advanced][dynamic_base_term]');
$this
->assertSession()
->fieldExists('settings[advanced][show_count]');
$this
->assertSession()
->fieldExists('settings[advanced][calculate_count_recursively]');
}