<td colspan="3">Date: <?php echo date('Y-m-d H:i:m'); ?> </td> </tr> <tr> <td></td> <td colspan="3">Default Domain: <b><?php echo $information->getDefaultDomain(); ?> </b></td> </tr> <tr> <td></td> <td colspan="3">Duration: <b><?php echo \Base\Date\Duration::format(floor($information->getDuration() / 1000), '%d day(s) ', '%d hour(s), ', '%d minute(s) ', '%d second(s)'); ?> </b></td> </tr> <tr> <td></td> <td colspan="3">Number of Tests: <b><?php echo $testCount; ?> </b></td> </tr> <tr style="height: 10px"><td colspan="4"></td></tr> <tr> <td class="legend">Legend</td> <td style="min-width:100px;" class="result_success result_column colorLegend">Success</td> <td style="min-width:100px;" class="result_failed result_column colorLegend">Failure</td>
/** * This function echoes the the duration, number of tests (errors and failures). * * @Event("LiveTest.Run.PostRun") * * @param Information $information */ public function postRun(Information $information) { $formattedDuration = Duration::format(floor($information->getDuration() / 1000), '%d day(s) ', '%d hour(s) ', '%d minute(s) ', '%d second(s)'); echo " Tests: " . $this->testCount . ' (failed: ' . $this->failureCount . ', error: ' . $this->errorCount . ') - Duration: ' . $formattedDuration; }
public function testFormatParameters() { $formattedDuration = Duration::format(86401, '%d day(s)'); $this->assertEquals('1 day(s)', $formattedDuration); }