2007-10-14 01:45:08 +04:00
|
|
|
<?php
|
2007-10-15 16:42:13 +04:00
|
|
|
class DoctrineTest_Reporter_Html extends DoctrineTest_Reporter{
|
2007-10-14 01:45:08 +04:00
|
|
|
public function paintHeader($name) {
|
|
|
|
?>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Doctrine Unit Tests</title>
|
|
|
|
<style>
|
|
|
|
.fail { color: red; } pre { background-color: lightgray; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1><?php echo $name ?></h1>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function paintFooter()
|
|
|
|
{
|
|
|
|
|
|
|
|
print '<pre>';
|
|
|
|
foreach ($this->_test->getMessages() as $message) {
|
|
|
|
print "<p>$message</p>";
|
|
|
|
}
|
|
|
|
print '</pre>';
|
|
|
|
$colour = ($this->_test->getFailCount() > 0 ? 'red' : 'green');
|
|
|
|
print '<div style=\'';
|
|
|
|
print "padding: 8px; margin-top: 1em; background-color: $colour; color: white;";
|
|
|
|
print '\'>';
|
|
|
|
print $this->_test->getTestCaseCount() . ' test cases.';
|
|
|
|
print '<strong>' . $this->_test->getPassCount() . '</strong> passes and ';
|
|
|
|
print '<strong>' . $this->_test->getFailCount() . '</strong> fails.';
|
|
|
|
print '</div>';
|
|
|
|
}
|
2007-10-24 00:21:22 +04:00
|
|
|
|
|
|
|
public function getProgressIndicator(){}
|
2007-10-14 01:45:08 +04:00
|
|
|
}
|