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.
Much of MenuTest has been written a long time ago, and this is apparent in the documentation, and in the poor choice of some variable names (e.g. '$big_user' to store an administrator). Let's clean it up a bit.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2093849-6-menutest-cleanup.patch | 17.06 KB | angel.h |
#6 | interdiff-2093849-1-6.txt | 3.42 KB | angel.h |
#1 | 2093849-1-menutest-cleanup.patch | 16.22 KB | pfrenssen |
Comments
Comment #1
pfrenssenHere's a patch.
$big_user
to$admin_user
$std_user
to$authenticated_user
Comment #3
pfrenssen#1: 2093849-1-menutest-cleanup.patch queued for re-testing.
Comment #4
angel.hComment #5
angel.hComment #6
angel.hYou removed the argument but the menu object is still passed as a parameter:
in testMenu().
Also for 3 methods the menu id is passed as parameter:
although this is quite unnecessary - OOP :) - we can use it directly in the methods like it was done here:
ignoring the unnesessary argument.
I created a new patch with all this in mind. You can also see an interdiff.
Comment #7
angel.hComment #8
pfrenssenNice catch! The test looks much better now.
Comment #9
pfrenssen6: 2093849-6-menutest-cleanup.patch queued for re-testing.
Comment #11
pfrenssenPatch still applies cleanly, and locally this test is green. Retesting.
Comment #12
pfrenssen6: 2093849-6-menutest-cleanup.patch queued for re-testing.
Comment #13
parthipanramesh CreditAttribution: parthipanramesh commentedGood job!
Comment #14
webchick6: 2093849-6-menutest-cleanup.patch queued for re-testing.
Comment #15
xjm6: 2093849-6-menutest-cleanup.patch queued for re-testing.
Comment #16
xjmNice work! Recategorizing as minor since it is pure cleanup for test code.
Comment #17
xjmAlso, this patch was RTBCed Nov. 28 and has just been retested since.
Comment #18
catch6: 2093849-6-menutest-cleanup.patch queued for re-testing.
Comment #19
webchickCommitted and pushed to 8.x. Thanks!
Comment #21
xjm