forked from GedasTheEvil/UnitTestParody
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-test.php
40 lines (36 loc) · 844 Bytes
/
run-test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<style>
.box {
background: #43e151;
border: solid green 4px;
padding: 8px;
margin:8px;
}
.fail {
border-color: red;
background: #df5844;
}
</style>
</head>
<body>
<?php
require_once('autoload.php');
try {
$test = new GedasTheEvil\Product\FibonacciTest();
$test->runTests();
?>
<div class="box">All <?=$test->getTestsTotal();?> tests Pass!</div>
<?php
} catch (\GedasTheEvil\Unit\AssertionFailed $e) {
?>
<pre class="box fail">
Passed <?=$test->getTestsPassed()?> out of <?=$test->getTestsTotal()?> and
failed with <?=$e->getMessage();?>
</pre>
<?php
}
?>
</body>
</html>