function _simpletest_format_summary_line

7.x simpletest.module _simpletest_format_summary_line($summary)
2 calls to _simpletest_format_summary_line()
theme_simpletest_result_summary in drupal-7.x/modules/simpletest/simpletest.pages.inc
Returns HTML for the summary status of a simpletest result.
_simpletest_batch_operation in drupal-7.x/modules/simpletest/simpletest.module
Batch operation callback.

File

drupal-7.x/modules/simpletest/simpletest.module, line 103
Provides testing functionality.

Code

function _simpletest_format_summary_line($summary) {
  $args = array(
    '@pass' => format_plural(isset($summary['#pass']) ? $summary['#pass'] : 0, '1 pass', '@count passes'),
    '@fail' => format_plural(isset($summary['#fail']) ? $summary['#fail'] : 0, '1 fail', '@count fails'),
    '@exception' => format_plural(isset($summary['#exception']) ? $summary['#exception'] : 0, '1 exception', '@count exceptions'),
  );
  if (!$summary['#debug']) {
    return t('@pass, @fail, and @exception', $args);
  }
  $args['@debug'] = format_plural(isset($summary['#debug']) ? $summary['#debug'] : 0, '1 debug message', '@count debug messages');
  return t('@pass, @fail, @exception, and @debug', $args);
}