summaryrefslogtreecommitdiff
path: root/modules/help
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-21 02:01:08 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-21 02:01:08 +0000
commit76c381ae2dfeb3b6884fb381c4a080a7f5a562ca (patch)
tree315424c887f27699072b515722c8854d9def879a /modules/help
parentd2c02ca453f938fb6f8f2c6853f36dfe426ced1f (diff)
downloadbrdo-76c381ae2dfeb3b6884fb381c4a080a7f5a562ca.tar.gz
brdo-76c381ae2dfeb3b6884fb381c4a080a7f5a562ca.tar.bz2
#295983 by naxoc and lilou: Add test for modules that do not implement hook_help().
Diffstat (limited to 'modules/help')
-rw-r--r--modules/help/help.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/help/help.test b/modules/help/help.test
index 7351650dd..de0ddfa6c 100644
--- a/modules/help/help.test
+++ b/modules/help/help.test
@@ -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'));
}
}