Commit 76c381ae authored by webchick's avatar webchick

#295983 by naxoc and lilou: Add test for modules that do not implement hook_help().

parent d2c02ca4
......@@ -85,5 +85,36 @@ class HelpTestCase extends DrupalWebTestCase {
$this->modules[$module->name] = $fullname['name'];
}
}
}
}
/**
* 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'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment