mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
MDL-19579 code coverage - add lang strings and open complete report in new window
This commit is contained in:
parent
70013fdcf9
commit
f40184265a
@ -5,13 +5,17 @@
|
||||
$string['all'] = 'ALL';
|
||||
$string['addconfigprefix'] = 'Add prefix to config file';
|
||||
$string['codecoverageanalysis'] = 'Perform code coverage analysis.';
|
||||
$string['codecoveragecompletereport'] = 'view code coverage complete report';
|
||||
$string['codecoveragedisabled'] = 'Cannot enable code coverage in this server (missing xdebug extension).';
|
||||
$string['confignonwritable'] = 'The file config.php is not writeable by the web server. Either change its permissions, or edit it with the appropriate user account, and add the following line before the closing php tag: <br />
|
||||
\$CFG->unittestprefix = \'tst_\' // Change tst_ to a prefix of your choice, different from \$CFG->prefix';
|
||||
$string['coveredlines'] = 'Covered lines';
|
||||
$string['coveredpercentage'] = 'Overall Code Coverage';
|
||||
$string['deletingnoninsertedrecord'] = 'Trying to delete a record that was not inserted by these unit tests (id $a->id in table $a->table).';
|
||||
$string['deletingnoninsertedrecords'] = 'Trying to delete records that were not inserted by these unit tests (from table $a->table).';
|
||||
$string['droptesttables'] = 'Drop test tables';
|
||||
$string['exception'] = 'Exception';
|
||||
$string['executablelines'] = 'Executable lines';
|
||||
$string['fail'] = 'Fail';
|
||||
$string['ignorefile'] = 'Ignore tests in the file';
|
||||
$string['ignorethisfile'] = 'Re-run the tests ignoring this test file.';
|
||||
@ -42,9 +46,11 @@ $string['testtablesneedupgrade'] = 'The test DB tables need to be upgraded. Do y
|
||||
$string['testtablesok'] = 'The test DB tables were successfully installed.';
|
||||
$string['testtablescsvfileunwritable'] = 'The test tables CSV file is not writable ($a->filename)';
|
||||
$string['timetakes'] = 'Time taken: $a.';
|
||||
$string['totallines'] = 'Total lines';
|
||||
$string['thorough'] = 'Run a thorough test (may be slow).';
|
||||
$string['updatingnoninsertedrecord'] = 'Trying to update a record that was not inserted by these unit tests (id $a->id in table $a->table).';
|
||||
$string['uncaughtexception'] = 'Uncaught exception [{$a->getMessage()}] in [{$a->getFile()}:{$a->getLine()}] TESTS ABORTED.';
|
||||
$string['uncoveredlines'] = 'Uncovered lines';
|
||||
$string['unittests'] = 'Unit tests';
|
||||
$string['unittestprefixsetting'] = 'Unit test prefix: <strong>$CFG->unittestprefix</strong> (Edit config.php to modify this).';
|
||||
$string['version'] = 'Using <a href=\"http://sourceforge.net/projects/simpletest/\">SimpleTest</a> version $a.';
|
||||
|
@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
/// TODO: provide one helper function to show links from test page to coverage report
|
||||
/// TODO: add missing lang strings
|
||||
|
||||
/**
|
||||
* Includes
|
||||
@ -449,9 +448,10 @@ class moodle_coverage_reporter extends HtmlCoverageReporter {
|
||||
array(get_string('coveredpercentage', 'simpletest'), format_float($data->totalpercentage, 2) . '%')
|
||||
);
|
||||
|
||||
$result .= $OUTPUT->heading($data->title, 3, 'main codecoverageheading', true);
|
||||
$result .= $OUTPUT->heading('<a href="' . $CFG->wwwroot . '/admin/report/unittest/coveragefile.php/' . $type . '/index.html"' .
|
||||
' title="">(' . get_string('codecoveragecompletereport', 'simpletest') . ')</a>', 4, 'main codecoveragelink', true);
|
||||
$url = $CFG->wwwroot . '/admin/report/unittest/coveragefile.php/' . $type . '/index.html';
|
||||
$result .= $OUTPUT->heading($data->title, 3, 'main codecoverageheading');
|
||||
$result .= $OUTPUT->heading('<a href="' . $url . '" onclick="javascript:window.open(' . "'" . $url . "'" . ');return false;"' .
|
||||
' title="">(' . get_string('codecoveragecompletereport', 'simpletest') . ')</a>', 4, 'main codecoveragelink');
|
||||
$result .= print_table($table, true);
|
||||
|
||||
return $OUTPUT->box($result, 'generalbox boxwidthwide boxaligncenter codecoveragebox', '', true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user