diff --git a/models/RelationTest.php b/models/RelationTest.php index b6972e997..9637112c9 100644 --- a/models/RelationTest.php +++ b/models/RelationTest.php @@ -8,3 +8,12 @@ class RelationTest extends Doctrine_Record } } +class RelationTestChild extends RelationTest +{ + public function setUp() + { + $this->hasOne('RelationTest as Parent', 'RelationTestChild.child_id'); + + $this->ownsMany('RelationTestChild as Children', 'RelationTestChild.child_id'); + } +} diff --git a/models/RelationTestChild.php b/models/RelationTestChild.php deleted file mode 100644 index befdc35c3..000000000 --- a/models/RelationTestChild.php +++ /dev/null @@ -1,10 +0,0 @@ -hasOne('RelationTest as Parent', 'RelationTestChild.child_id'); - - $this->ownsMany('RelationTestChild as Children', 'RelationTestChild.child_id'); - } -} diff --git a/tests/cc.php b/tests/cc.php index 1b27d46fc..37b1a4144 100644 --- a/tests/cc.php +++ b/tests/cc.php @@ -32,28 +32,7 @@ $reporter = new Doctrine_Coverage_Report("coverage.txt"); .red{ background: red;} .orange{ background: #f90;} - 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; - } @@ -136,10 +115,10 @@ class Doctrine_Coverage_Report } $coveredLines = $this->coverage[$key]; $fileArray = file(Doctrine::getPath() . "/".$fileName); - $html .= '
' . "\n"; + $html .= '' . "\n"; foreach ($fileArray as $num => $line){ $linenum = $num+1; - $html .= '
' . $linenum . '
' . "\n"; + $html .= '' . "\n"; $class ="normal"; if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == 1){ $class = "covered"; @@ -148,9 +127,11 @@ class Doctrine_Coverage_Report } else if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == -2) { $class ="orange"; } - $html .= '
' . htmlspecialchars($line) . '
' . "\n"; + + $line = str_replace(" ", " ", htmlspecialchars($line)); + $html .= '' . "\n"; } - $html .=''; + $html .='
' . $linenum . '' . $line . '
'; echo $html; } diff --git a/tests/run.php b/tests/run.php index 636fb412d..0d3664f2c 100644 --- a/tests/run.php +++ b/tests/run.php @@ -425,7 +425,7 @@ if (PHP_SAPI === "cli") { $argv = $_SERVER["argv"]; $coverage = false; array_shift($argv); -if(isset($argv[1]) && $argv[1] == "coverage"){ +if(isset($argv[0]) && $argv[0] == "coverage"){ array_shift($argv); $coverage = true; }