You are here

function simpletest_help in SimpleTest 5

Same name and namespace in other branches
  1. 8.3 simpletest.module \simpletest_help()
  2. 6.2 simpletest.module \simpletest_help()
  3. 6 simpletest.module \simpletest_help()
  4. 7.2 simpletest.module \simpletest_help()
  5. 7 simpletest.module \simpletest_help()

Implementation of hook_help().

File

./simpletest.module, line 6

Code

function simpletest_help($section) {
  $output = '';
  switch ($section) {
    case 'admin/modules#description':
      $output = t("Simple unit testing suite");
      break;
    case 'admin/help#simpletest':
      $output = '<p>' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules. It integrates with the <a href="@simpletest-official">SimpleTest PHP library</a>.', array(
        '@simpletest-official' => 'http://www.simpletest.org/',
      )) . '</p>';
      $output .= '<p>' . t('Visit <a href="@admin-simpletest">Administer >> Site building >> SimpleTest</a> to display a list of available tests. For comprehensive testing, select <em>all</em> tests, or individually select tests for more targeted testing. (Note: Selecting <em>all</em> tests may take several minutes to complete.)', array(
        '@admin-simpletest' => url('admin/build/simpletest'),
      )) . '</p>';
      $output .= '<p>' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') . '</p>';
      $output .= '<p>' . t('For more information on creating and modifying your own tests, see the <a href="@simpletest-api">SimpleTest API Documentation</a> in the Drupal handbook.', array(
        '@simpletest-api' => 'http://drupal.org/simpletest',
      )) . '</p>';
      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@simpletest">SimpleTest module</a>.', array(
        '@simpletest' => 'http://drupal.org/handbook/modules/simpletest',
      )) . '</p>';
  }
  return $output;
}