var $strseparator;
+ var $timestart;
+
/**
* Constructor.
*
* Output anything that should appear above all the test output.
*/
function paintHeader($test_name) {
+ $this->timestart = time();
// We do this the moodle way instead.
}
echo '</div>';
echo '<div class="performanceinfo">',
- $this->get_string('runat', date('<b>d-m-Y H:i T</b>')),
+ $this->get_string('runat', userdate($this->timestart)), ' ',
+ $this->get_string('timetakes', format_time(time() - $this->timestart)), ' ',
$this->get_string('version', SimpleTestOptions::getVersion()),
'</div>';
}
$string['testtablesneedupgrade'] = 'The test DB tables need to be upgraded. Do you wish to proceed with the upgrade now?';
$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['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.';