function simpletest_result_status_image in SimpleTest 6.2
Same name and namespace in other branches
- 7.2 simpletest.pages.inc \simpletest_result_status_image()
- 7 simpletest.pages.inc \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 ./
simpletest.pages.inc - Test results form for $test_id.
File
- ./
simpletest.pages.inc, line 418 - 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', 'misc/watchdog-ok.png', t('Pass')),
'fail' => theme('image', 'misc/watchdog-error.png', t('Fail')),
'exception' => theme('image', 'misc/watchdog-warning.png', t('Exception')),
'debug' => theme('image', 'misc/watchdog-warning.png', t('Debug')),
);
}
if (isset($map[$status])) {
return $map[$status];
}
return FALSE;
}