1 simpletest.pages.inc simpletest_result_status_image($status)

Get the appropriate image for the status.

Parameters

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

Return value

HTML image or false.:

File

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

Code

function simpletest_result_status_image($status) {
  // $map does not use backdrop_static() as its value never changes.
  static $map;

  if (!isset($map)) {
    $map = array(
      'pass' => theme('image', array('path' => 'core/misc/watchdog-ok.png', 'width' => 18, 'height' => 18, 'alt' => t('Pass'))),
      'fail' => theme('image', array('path' => 'core/misc/watchdog-error.png', 'width' => 18, 'height' => 18, 'alt' => t('Fail'))),
      'exception' => theme('image', array('path' => 'core/misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('Exception'))),
      'debug' => theme('image', array('path' => 'core/misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('Debug'))),
    );
  }
  if (isset($map[$status])) {
    return $map[$status];
  }
  return FALSE;
}