diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index 463bcd5..3cb8462 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -94,8 +94,10 @@ public function testBlockCategory() { $this->drupalPostForm(NULL, array(), t('Save')); + // The category wiil have been sanitized, had any leading or trailing + // hyphens removed, and then converted to a unique HTML ID. + $category_id = 'edit-' . drupal_html_id(trim(String::checkPlain($category), '-')); // Test that the blocks are listed under the correct categories. - $category_id = 'edit-' . drupal_html_id(String::checkPlain($category)); $arguments[':id'] = $category_id; $this->drupalGet('admin/structure/block'); $elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);