Some prior test coverage is being removed:
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockTemplateSuggestionsUnitTest.phpundefined
@@ -26,31 +33,23 @@ public static function getInfo() {
- // Define block delta with underscore to be preprocessed
- $block1 = new stdClass();
- $block1->module = 'block';
- $block1->delta = 'underscore_test';
- $block1->region = 'footer';
- $variables1 = array();
- $variables1['elements']['#block'] = $block1;
- $variables1['elements']['#children'] = '';
- template_preprocess_block($variables1);
- $this->assertEqual($variables1['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__underscore_test'), 'Found expected block suggestions for delta with underscore');
-
- // Define block delta with hyphens to be preprocessed. Hyphens should be
- // replaced with underscores.
- $block2 = new stdClass();
- $block2->module = 'block';
- $block2->delta = 'hyphen-test';
- $block2->region = 'footer';
- $variables2 = array();
- $variables2['elements']['#block'] = $block2;
- $variables2['elements']['#children'] = '';
...
- $variables2['content_attributes']['class'][] = 'test-class';
- template_preprocess_block($variables2);
- $this->assertEqual($variables2['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__hyphen_test'), 'Hyphens (-) in block delta were replaced by underscore (_)');
- // Test that the default class and added class are available.
- $this->assertEqual($variables2['content_attributes']['class'], array('test-class', 'content'), 'Default .content class added to block content_attributes_array');
+ $variables['content_attributes']['class'][] = 'test-class';
+ template_preprocess_block($variables);
+ $this->assertEqual($variables['theme_hook_suggestions'], array('block__footer', 'block__system', 'block__system_menu_block', 'block__system_menu_block__menu_admin'));
+ $this->assertEqual($variables['content_attributes']['class'], array('test-class', 'content'), 'Default .content class added to block content_attributes_array');
Comments
Comment #1
xjmComment #2
xjmComment #2.0
xjmUpdated issue summary.
Comment #2.1
xjmRemoving myself from the author field so that I can unfollow the issue. --xjm
Comment #5
tim.plunkettNot actively part of the Blocks-Layouts work.
Comment #17
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #19
smustgrave commentedI think this can be closed as outdated. This test class no longer exists for one. Currently though we got
BlockTemplateSuggestionsTest::testBlockThemeHookSuggestions() in both block_content and block module that seem to cover the template suggestions just fine.
If I'm wrong we can re-open but don't see any actionable items right now.