Exemple #1
0
if (count($result->passed())) {
    ?>
<tr style='background-color:green;color:white;font-weight:bold;'>
<td colspan='4' >
	<?php 
    exho(count($result->passed()));
    ?>
 Tests Passed
</td>
</tr>
<?php 
}
DumpResultRows($result->failures(), "red", "white", "Tests Failed");
DumpResultRows($result->errors(), "#FF7700", "white", "Tests Have Errors");
DumpResultRows($result->notImplemented(), "yellow", "blue", "Tests Not Implemented", true);
DumpResultRows($result->skipped(), "gray", "white", "Tests Skipped", true);
?>

<tr style='background-color:black;color:white;text-align:right;'>
<td colspan='4'>
	<span style='float:left;'>Time: <?php 
echo $profiler->Timer();
?>
 seconds <span style='color:gray;'>(<?php 
printf("%.3fs on %d SQL queries", jf::db()->QueryTime(), jf::db()->QueryCount());
?>
)</span></span> Total: <?php 
echo $result->count();
?>
 Tests in <?php 
echo count(\jf\TestLauncher::$TestFiles);
Exemple #2
0
            echo "\t";
            $e = new Exception();
            echo $test->getExceptionAsString();
            echo "\t";
            $trace = $test->thrownException()->getTrace();
            if ($Odd) {
                $file = $trace[0]['file'];
            } else {
                $file = $trace[3]['file'];
            }
            $dir = substr($file, 0, strlen(jf::root()));
            $dir = substr($file, 0, strpos($file, DIRECTORY_SEPARATOR, strlen($dir) + 1));
            $dir = substr($file, 0, strpos($file, DIRECTORY_SEPARATOR, strlen($dir) + 1));
            $filename = substr($file, strlen($dir) + 1);
            echo $filename;
            echo "\n";
        }
        echo str_repeat("-", 80) . "\n";
    }
}
?>
                    -----======== Test Results ========-----
<?php 
if (count($result->passed())) {
    echo "✓  " . count($result->passed()) . " Tests Passed\n" . str_repeat("-", "80") . "\n";
}
DumpResultRows($result->failures(), "✖  ", "Tests Failed");
DumpResultRows($result->errors(), "◉ ", "Tests Have Errors");
DumpResultRows($result->notImplemented(), "✎  ", "Tests Not Implemented", true);
DumpResultRows($result->skipped(), "◎  ", "Tests Skipped", true);
echo "\tTotal: " . $result->count() . " Tests in " . count(\jf\TestLauncher::$TestFiles) . " Files (" . $profiler->Timer() . " seconds)\n";