We need a test for menu callbacks in different files. Here's what needs to happen:
A test module needs to be created with two functions: return_hi, which just returns 'hi', and a hook_menu.
The test module needs an including one function, return_bye, which returns 'bye'.
The hook_menu needs to contain three menu items: one who's page and access calbacks are return_hi, but who's title callback is return_bye, one who's page and title callbacks are return_hi, but who's access callback is return_bye, and one who's access and title callbacks are return_hi and who's page callback is return_bye.
Then, the test needs to call all of these pages and make sure the appropriate thigns happen.
Also please think of better functoin names.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menu-331720-1.patch | 5.14 KB | bradfordcp |
Comments
Comment #1
bradfordcp commentedComment #2
bradfordcp commentedTests currently do not pass as there is a bug within _menu_check_access() see #436940: _menu_check_access() cannot call access callback functions within include files.
Comment #4
bradfordcp commentedThis should pass now that #436940: _menu_check_access() cannot call access callback functions within include files. is in.
Comment #5
pwolanin commentedLooks fine - are there any tests from the menu module test that should be moved to this new test file? If so, that can be a follow-up issue.
Comment #6
bradfordcp commentedAdjusting the functions to better work with #296292: Menu access callbacks need a test
Comment #7
bradfordcp commentedDuplicate of #296292: Menu access callbacks need a test...
Test is included in the patch there