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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pfrenssen’s picture

Status: Active » Needs review
FileSize
1.28 KB
pfrenssen’s picture

Issue tags: +Novice

Adding tag, this is easy to review :)

johnmcc’s picture

Looks 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.

pfrenssen’s picture

Yes 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? :)

johnmcc’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Great catch!

Committed and pushed to 8.x. Thanks!

Back to 7.x.

johnmcc’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.18 KB

Here's a backport for 7.x.

pfrenssen’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

David_Rothstein’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.