1
0
mirror of synced 2025-01-18 06:21:40 +03:00

fixed output of cli testrunner

This commit is contained in:
meus 2007-07-28 20:28:20 +00:00
parent 4e4dc0a6df
commit c38958debe
5 changed files with 36 additions and 7 deletions

View File

@ -36,7 +36,6 @@ class Doctrine_ColumnAggregationInheritance_TestCase extends Doctrine_UnitTestCa
public function prepareData()
{
parent::prepareData();
//we create a test entity that is not a user and not a group
$entity = new Entity();

View File

@ -26,6 +26,10 @@ class GroupTest extends UnitTestCase
$this->_messages = array_merge($this->_messages, $testCase->getMessages());
$this->_testCases[$k] = null;
if(PHP_SAPI === "cli"){
echo ".";
}
set_time_limit(900);
}
$reporter->setTestCase($this);

View File

@ -8,8 +8,32 @@ $path = "/home/bjartka/workspace/doctrine/lib/";
<html>
<head>
<style type="text/css">
.covered{ background: #eee;}
.covered{ background: green;}
.normal{ background: white;}
.error{ background: red;}
dl.table-display
{
margin: 2em 0;
padding: 0;
font-family: georgia, times, serif;
}
.table-display dt
{
float: left;
margin: 0 0 0 0;
padding: 0 .5em 0 .5em;
}
/* commented backslash hack for mac-ie5 \*/
dt { clear: both; }
/* end hack */
.table-display dd{
float: left;
margin: 0 0 0 0;
}
</style>
</head>
<body>
@ -24,19 +48,20 @@ function getCoverageReport($file){
}
$coveredLines = $coverage[$file];
$fileArray = file($file);
$html .= '<dl class="filelist">' . "\n";
$html .= '<dl class="table-display">' . "\n";
foreach($fileArray as $num => $line){
$linenum = $num+1;
$linenum = $num+1;
$html .= '<dt>' . $linenum . '</dt>' . "\n";
$class ="normal";
if(isset($coveredLines[$linenum]) && $coveredLines[$linenum] == 1){
$class = "covered";
}else if(isset($coveredLines[$linenum]) && $coveredLines[$linenum] == -1){
$class ="error";
}
$html .= '<dd class="' . $class . '">' . htmlspecialchars($line) . '</dd>' . "\n";
}
$html .='</dl></div>';
return $html;
}
if(isset($_GET["file"])){

File diff suppressed because one or more lines are too long

View File

@ -358,6 +358,7 @@ class CliReporter extends HtmlReporter{
echo "====================\n";
}
public function paintFooter(){
echo "\n";
foreach ($this->_test->getMessages() as $message) {
print $message . "\n";
}