2005-06-18 23:26:35 +00:00
|
|
|
<?php /* if ($success) { ?>
|
2005-05-22 23:24:09 +00:00
|
|
|
<p class="box" id="ok"><b>PASSED</b></p>
|
|
|
|
<?PHP } else { ?>
|
|
|
|
<p class="box" id="error"><b>FAILED</b></p>
|
|
|
|
<?PHP } ?>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<?PHP foreach ($results as $r) {
|
2005-06-18 23:26:35 +00:00
|
|
|
$performed = $r['result']['tests'];
|
2005-05-22 23:24:09 +00:00
|
|
|
if ($performed||1) {
|
|
|
|
?>
|
|
|
|
<tr><th><b><?=$r['name']?></b> <?=$performed?> test<?=$performed==1?'':'s'?></th></tr>
|
|
|
|
<?PHP if ($r['result']['tests']) {
|
2005-06-18 23:26:35 +00:00
|
|
|
foreach ($r['result']['details'] as $detail) {
|
|
|
|
if ($detail['failed']) { ?>
|
2005-05-22 23:24:09 +00:00
|
|
|
<tr class="fail"><td><?=$r['name']?>::<?=$detail['method']?></td></tr>
|
2005-06-18 23:26:35 +00:00
|
|
|
<?PHP foreach ($detail['errors'] as $error) { ?>
|
2005-05-22 23:24:09 +00:00
|
|
|
<tr class="info"><td>
|
|
|
|
<span class="ok"><?=$error['expected'][0]?></span> <em><?=$error['expected'][1]?></em><br />
|
|
|
|
<span class="not"><?=$error['actual'][0]?></span> <em><?=$error['actual'][1]?></em>
|
|
|
|
</td></tr>
|
2005-06-18 23:26:35 +00:00
|
|
|
<?PHP
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else { ?>
|
2005-05-22 23:24:09 +00:00
|
|
|
<tr class="pass"><td><?=$r['name']?>::<?=$detail['method']?></td></tr>
|
|
|
|
|
|
|
|
<?PHP } } } } } ?>
|
|
|
|
</table>
|
2005-06-18 23:26:35 +00:00
|
|
|
<?php */ ?>
|