Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The assert messages in testMenuTreeData()
mention that "hyphens are changed to dashes", but hyphens and dashes are the same thing. It should be "changed to underscores".
// Validate that the - in main-menu is changed into an underscore
$this->assertEqual($output['1']['#theme'], 'menu_link__main_menu', 'Hyphen is changed to a dash on menu_link');
$this->assertEqual($output['#theme_wrappers'][0], 'menu_tree__main_menu', 'Hyphen is changed to a dash on menu_tree wrapper');
This also occurs in D7.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1993728-1-system-testmenutreedata_underscores_new.patch | 1.18 KB | johnmcc |
#1 | 1993728-1-system-testmenutreedata_underscores.patch | 1.28 KB | pfrenssen |
Comments
Comment #1
pfrenssenComment #2
pfrenssenAdding tag, this is easy to review :)
Comment #3
johnmcc CreditAttribution: johnmcc commentedLooks good, applies cleanly, and the relevant tests still pass.
The only thing I would suggest is that the other asserts in this test breach Drupal's coding standards for function calls. (They have a space between the parenthesis and the first argument.) This should probably be a new ticket though.
Comment #4
pfrenssenYes indeed, I only corrected this in the lines that are relevant to this issue. The others should be fixed in another issue.
If you approve the patch, would you like to mark it as RTBC? :)
Comment #5
johnmcc CreditAttribution: johnmcc commentedComment #6
webchickGreat catch!
Committed and pushed to 8.x. Thanks!
Back to 7.x.
Comment #7
johnmcc CreditAttribution: johnmcc commentedHere's a backport for 7.x.
Comment #8
pfrenssenLooks good!
Comment #9
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/1f7dc27