Define a menu item without an access callback and with a permission as the access argument. Check that users with that permission can access the page and without it can't access.

Comments

mikey_p’s picture

Status: Active » Needs review
StatusFileSize
new3.35 KB

(trying to think of something witty to say for my first test)

After this, we should rename hook_menu.module to reflect the standards for mock module names. See #320363: Rename mock modules.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
catch’s picture

Category: bug » task
Status: Needs review » Needs work

We no longer have phpdoc for setUp(), getInfo() or tearDown()
http://drupal.org/node/325974

mikey_p’s picture

Status: Needs work » Needs review
StatusFileSize
new3.14 KB

No more comments for getInfo(), setUp().

catch’s picture

Component: tests » menu system
Status: Needs review » Needs work

No longer applies - hook_menu.module is now menu_test.module

mikey_p’s picture

Status: Needs work » Needs review
StatusFileSize
new2.67 KB

Doh, I filed the issue to rename the mock module!

Try again...

Status: Needs review » Needs work

The last submitted patch failed testing.

mikey_p’s picture

Status: Needs work » Needs review

retest

Status: Needs review » Needs work

The last submitted patch failed testing.

bradfordcp’s picture

Status: Needs work » Closed (duplicate)

Duplicate of #296292: Menu access callbacks need a test

Code from mikey_p has been rolled in there....