function _simpletest_format_summary_line in SimpleTest 7
Same name and namespace in other branches
- 8.3 simpletest.module \_simpletest_format_summary_line()
- 6.2 simpletest.module \_simpletest_format_summary_line()
- 7.2 simpletest.module \_simpletest_format_summary_line()
2 calls to _simpletest_format_summary_line()
- theme_simpletest_result_summary in ./
simpletest.pages.inc - Add wrapper div with class based on summary status.
- _simpletest_batch_operation in ./
simpletest.module - Batch operation callback.
File
- ./
simpletest.module, line 112 - 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);
}