Permalink
Browse files

Add for later use.

  • Loading branch information...
1 parent 03e5571 commit 2aae4164e28391724c57d96f8e5e8f23a1f40c8e @sebastianbergmann committed Sep 27, 2006
Showing with 24 additions and 0 deletions.
  1. +24 −0 PHPUnit/Util/Report/Coverage/Node/File.php
@@ -89,6 +89,12 @@ class PHPUnit_Util_Report_Coverage_Node_File extends PHPUnit_Util_Report_Coverag
* @var array
* @access protected
*/
+ protected $coveringTestsByLine = array();
+
+ /**
+ * @var array
+ * @access protected
+ */
protected $executedLines;
/**
@@ -150,6 +156,24 @@ public function setupCoveringTests(PHPUnit_Util_Report_Test_Node_TestSuite $test
} else {
$testCase[$testId]['numLinesExecuted']++;
}
+
+ if (!isset($this->coveringTestsByLine[$line])) {
+ $this->coveringTestsByLine[$line] = array();
+ }
+
+ $found = FALSE;
+
+ foreach ($this->coveringTestsByLine[$line] as $_test) {
+ if ($_test === $test) {
+ $found = TRUE;
+ }
+
+ break;
+ }
+
+ if (!$found) {
+ $this->coveringTestsByLine[$line][] = $test;
+ }
}
}
}

0 comments on commit 2aae416

Please sign in to comment.