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.
Need to test menu rebuilding through the variable 'menu_rebuild_needed'.
Comment | File | Size | Author |
---|---|---|---|
#11 | menu_rebuild_8.patch | 2.65 KB | mikey_p |
#7 | menu_rebuild_7.patch | 1.96 KB | nielsvm |
#6 | menu_rebuild_6.patch | 2.26 KB | mikey_p |
#3 | menu_rebuild_3.patch | 2.4 KB | mikey_p |
#1 | menu_rebuild_needed_test.patch | 2.05 KB | nielsvm |
Comments
Comment #1
nielsvm CreditAttribution: nielsvm commentedHarold (MadHarold) and I wrote a simple test for this which should do the job. The test tests if the rebuild is fired by manually deleting a record from menu_router and checking if it returns after a page request.
See patch attached.
Comment #2
mikey_p CreditAttribution: mikey_p commentedAll tests pass.
Comment #3
mikey_p CreditAttribution: mikey_p commentedChange description of final assertion, change delete query to use DBTNG.
Comment #4
benshell CreditAttribution: benshell commentedIt works and the code makes sense.
Comment #5
webchickOk, since this is a TestingParty patch, that means a merciless review since that way you learn best practices. Also, it's fun. ;)
a) That should be MenuRebuildTestCase.
b) Please include a one-liner of PHPDoc to explain what this test case is for.
a) PHPDoc above functions should always attempt to fit in one line at < 80 chars. If more explanation than that is needed, make it a second sentence below.
b) Should be a menu_rebuild() not an menu_rebuild().
All comments should end in a period.
a) We don't smoosh together words, so this should be $admin_exists. Needs changing throughout.
Please move this to up above this line instead. Inline inline comments are ok for rare circumstances but are generally discouraged, especially when they're long like this.
Darn! That's all I could find. Great job! :)
Comment #6
mikey_p CreditAttribution: mikey_p commentedFun huh? I can't imagine what you qualify as 'unfun,' but anyway....
Fixed all your points.
Comment #7
nielsvm CreditAttribution: nielsvm commentedUpdated patch to remove the always surprising trailing whitespace.
Comment #9
lilou CreditAttribution: lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #10
catchWe no longer have phpdoc for setUp(), getInfo() or tearDown()
http://drupal.org/node/325974
Comment #11
mikey_p CreditAttribution: mikey_p commentedSomething to be thankful for, at a thankful time of year ;)
Cleans up all of modules/simpletest/tests/menu.test.
Comment #12
catchPatch looks good, all tests pass. RTBC.
Comment #13
webchickCommitted to HEAD with some minor whitespace clean-up. Thanks!! :)