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.
Related issue: #2631468: Menu subtrees in menu blocks show all subitems regardless of the active menu item
Patch for the related issue works, but the test itself needs to be re-written
From @DamienMcKenna's comment :
Could it be argued that the testConfigLevelDepth test was wrong in the first place?
The test's menu structure should be like this:
- test.example1
- test.example2
- test.example3
- test.example4
- test.example3
- test.example5
- test.example7
- test.example6
- test.example8
Therefore the test should have checked that if the menu level was set to '2' that only test.example3 or test.example7 would show, whereas the bug indicates that both would be shown.
Back to writing tests.
Comment | File | Size | Author |
---|---|---|---|
#4 | MenuBlockTest-rewite_test_ConfigLevelDepth-2745003.patch | 1.41 KB | AaronBauman |
Comments
Comment #2
kiwad CreditAttribution: kiwad commentedComment #4
AaronBaumanIn this patch, 3 changes across 2 cases:
Case 1. No active trail is set: links with level greater than 1 should not appear be rendered for menu blocks with starting depth greater than 1.
Case 2. Active trail is set: Only links along the active trail should appear
and same here:
We expect this test to fail, because of #2631468: Menu subtrees in menu blocks show all subitems regardless of the active menu item
Not sure what the proper protocol is for indicating this.
Comment #6
DamienMcKennaThis is a duplicate of #2631468: Menu subtrees in menu blocks show all subitems regardless of the active menu item and isn't needed.