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 modules/simpletest/simpletest.pages.inc
Test results form for $test_id.

File

modules/simpletest/simpletest.pages.inc, line 414

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.