Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
76c381ae
Commit
76c381ae
authored
Jul 21, 2009
by
webchick
Browse files
#295983
by naxoc and lilou: Add test for modules that do not implement hook_help().
parent
d2c02ca4
Changes
1
Show whitespace changes
Inline
Side-by-side
modules/help/help.test
View file @
76c381ae
...
...
@@ -87,3 +87,34 @@ class HelpTestCase extends DrupalWebTestCase {
}
}
}
/**
* Tests module without help to verify it is not listed in help page.
*/
class
NoHelpTestCase
extends
DrupalWebTestCase
{
protected
$big_user
;
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'No help'
,
'description'
=>
'Verify no help is displayed for modules not providing any help.'
,
'group'
=>
'Help'
,
);
}
function
setUp
()
{
// Use one of the test modules that do not implement hook_help().
parent
::
setUp
(
'menu_test'
);
$this
->
big_user
=
$this
->
drupalCreateUser
(
array
(
'access administration pages'
));
}
/**
* Ensure modules not implementing help do not appear on admin/help.
*/
function
testMainPageNoHelp
()
{
$this
->
drupalLogin
(
$this
->
big_user
);
$this
->
drupalGet
(
'admin/help'
);
$this
->
assertNoText
(
'Hook menu tests'
,
t
(
'Making sure the test module menu_test does not display a help link in admin/help'
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment