protected function HelpTest::verifyHelp

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

Parameters

integer $response: An HTTP response code.

1 call to HelpTest::verifyHelp()
HelpTest::testHelp in drupal/core/modules/help/lib/Drupal/help/Tests/HelpTest.php
Logs in users, creates dblog events, and tests dblog functionality.

File

drupal/core/modules/help/lib/Drupal/help/Tests/HelpTest.php, line 90
Definition of Drupal\help\Tests\HelpTest.

Class

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

Namespace

Drupal\help\Tests

Code

protected function verifyHelp($response = 200) {
  foreach ($this
    ->getModuleList() 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,
      )));
    }
  }
}