You are here

protected function HelpTestCase::verifyHelp in Drupal 7

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 75
Tests for help.module.

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,
      )));
    }
  }
}