Skip to content
Snippets Groups Projects
Commit a86f6793 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #992376 follow-up by larowlan: Tests for paths containing a hyphen and...

Issue #992376 follow-up by larowlan: Tests for paths containing a hyphen and theme_hook_suggestions().
parent b8eb033b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -42,6 +42,11 @@ class ThemeUnitTest extends DrupalWebTestCase {
$args = array('node', "1\0");
$suggestions = theme_get_suggestions($args, 'page');
$this->assertEqual($suggestions, array('page__node', 'page__node__%', 'page__node__1'), t('Removed invalid \\0 from suggestions'));
// Define path with hyphens to be used to generate suggestions.
$args = array('node', '1', 'hyphen-path');
$result = array('page__node', 'page__node__%', 'page__node__1', 'page__node__hyphen_path');
$suggestions = theme_get_suggestions($args, 'page');
$this->assertEqual($suggestions, $result, t('Found expected page suggestions for paths containing hyphens.'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment