| 7 help.test | HelpTestCase::testHelp() |
| 8 help.test | HelpTestCase::testHelp() |
Logs in users, creates dblog events, and tests dblog functionality.
File
- modules/
help/ help.test, line 43 - Tests for help.module.
Code
function testHelp() {
// Login the admin user.
$this->drupalLogin($this->big_user);
$this->verifyHelp();
// Login the regular user.
$this->drupalLogin($this->any_user);
$this->verifyHelp(403);
// Check for css on admin/help.
$this->drupalLogin($this->big_user);
$this->drupalGet('admin/help');
$this->assertRaw(drupal_get_path('module', 'help') . '/help.css', t('The help.css file is present in the HTML.'));
// Verify that introductory help text exists, goes for 100% module coverage.
$this->assertRaw(t('For more information, refer to the specific topics listed in the next section or to the <a href="@drupal">online Drupal handbooks</a>.', array('@drupal' => 'http://drupal.org/documentation')), 'Help intro text correctly appears.');
// Verify that help topics text appears.
$this->assertRaw('<h2>' . t('Help topics') . '</h2><p>' . t('Help is available on the following items:') . '</p>', t('Help topics text correctly appears.'));
// Make sure links are properly added for modules implementing hook_help().
foreach ($this->modules as $module => $name) {
$this->assertLink($name, 0, t('Link properly added to @name (admin/help/@module)', array('@module' => $module, '@name' => $name)));
}
}
Login or register to post comments