function HelpTestCase::verifyHelp

Verifies the logged in user has access to the various help nodes.

Parameters

integer $response: An HTTP response code.

1 call to HelpTestCase::verifyHelp()
HelpTestCase::testHelp in modules/help/help.test
Logs in users, creates dblog events, and tests dblog functionality.

File

modules/help/help.test, line 80

Class

HelpTestCase
Tests help display and user access for all modules implementing help.

Code

protected function verifyHelp($response = 200) {
    foreach ($this->modules as $module => $name) {
        // View module help node.
        $this->drupalGet('admin/help/' . $module);
        $this->assertResponse($response);
        if ($response == 200) {
            $this->assertTitle($name . ' | Drupal', format_string('%module title was displayed', array(
                '%module' => $module,
            )));
            $this->assertRaw('<h1 class="page-title">' . t($name) . '</h1>', format_string('%module heading was displayed', array(
                '%module' => $module,
            )));
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.