function simpletest_result_status_image

Get the appropriate image for the status.

Parameters

$status Status string, either: pass, fail, exception.:

Return value

HTML image or false.

1 call to simpletest_result_status_image()
simpletest_result_form in drupal/core/modules/simpletest/simpletest.pages.inc
Test results form for $test_id.

File

drupal/core/modules/simpletest/simpletest.pages.inc, line 412
Page callbacks for simpletest module.

Code

function simpletest_result_status_image($status) {

  // $map does not use drupal_static() as its value never changes.
  static $map;
  if (!isset($map)) {
    $map = array(
      'pass' => theme('image', array(
        'uri' => 'core/misc/watchdog-ok.png',
        'width' => 18,
        'height' => 18,
        'alt' => t('Pass'),
      )),
      'fail' => theme('image', array(
        'uri' => 'core/misc/watchdog-error.png',
        'width' => 18,
        'height' => 18,
        'alt' => t('Fail'),
      )),
      'exception' => theme('image', array(
        'uri' => 'core/misc/watchdog-warning.png',
        'width' => 18,
        'height' => 18,
        'alt' => t('Exception'),
      )),
      'debug' => theme('image', array(
        'uri' => 'core/misc/watchdog-warning.png',
        'width' => 18,
        'height' => 18,
        'alt' => t('Debug'),
      )),
    );
  }
  if (isset($map[$status])) {
    return $map[$status];
  }
  return FALSE;
}