paintFooter() public method

Paints the end of the test with a summary of the passes and failures.
public paintFooter ( string $test_name )
$test_name string Name class of test.
 function paintFooter($test_name)
 {
     $duration = microtime(true) - $this->_timer;
     $micro = round($duration - floor($duration), 2);
     $seconds = floor($duration);
     $minutes = floor($seconds / 60);
     $seconds = $seconds % 60;
     $d = $minutes ? $minutes . ' minute' . ($minutes > 1 ? 's ' : ' ') : '';
     $d .= $seconds + $micro . ' seconds';
     echo '<div style="border:1px solid orange; background: lightyellow; color:orange">Time taken: ' . $d . '</div>';
     parent::paintFooter($test_name);
 }
Beispiel #2
0
 function paintFooter($test_name)
 {
     if ($this->getFailCount() + $this->getExceptionCount() == 0) {
         $text = $this->getPassCount() . " tests ok";
         print "<div style=\"background-color:#F5FFA8; text-align:center; right:10px; top:30px; border:2px solid green; z-index:10; position:absolute;\">{$text}</div>";
     } else {
         parent::paintFooter($test_name);
         print "</div>";
     }
 }
Beispiel #3
0
 function paintFooter($test_name)
 {
     echo '<div class="progress percents" style="z-index:12">Done.</div>';
     ob_end_flush();
     parent::paintFooter($test_name);
 }