diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt index e5d0a6e51ef..91503b63c2f 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt index fafad037b6a..83285e5aa14 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt index 06fdaf9a321..427ebd020de 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class.phpt index bfaf71e8ecc..1a502fb77fb 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-isolation.phpt index dfc7b492b4f..7d1768143ec 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-isolation.phpt @@ -24,7 +24,7 @@ OK (3 tests, 3 assertions) Writing code coverage data to XML file, this may take a moment. - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt index 86447ea5f4d..d7893a4bb7b 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-method.phpt b/PHPUnit/Tests/TextUI/coverage-clover-method.phpt index 1fa75d4e6e8..3a17ada8de4 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-method.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-method.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt index a0f1691aa3c..e9ca26e6a6f 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt index 6fd31529c7e..9b207c5b418 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt index 8fe5c329f32..560d2bab47e 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt index c73f90815c0..5f095ee6597 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt index 7ba7cfc960b..29b2ef1e2b0 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt index d3cec40fe2c..293704cf7ff 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt index e36e6c0d0f6..00c5508643f 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt @@ -24,7 +24,7 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-private.phpt b/PHPUnit/Tests/TextUI/coverage-clover-private.phpt index f6b5772946a..2dd594d29d8 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-private.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-private.phpt @@ -23,7 +23,7 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt index 6f29bd8cc2f..21fcbfdc3f4 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt b/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt index a76b545321d..591e81be4ce 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt index e327c8c3004..92366580019 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt @@ -24,12 +24,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -49,8 +49,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover-public.phpt b/PHPUnit/Tests/TextUI/coverage-clover-public.phpt index 373fa57b5db..d2128c10957 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-public.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-public.phpt @@ -23,12 +23,12 @@ OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. - + - + @@ -48,8 +48,8 @@ Writing code coverage data to XML file, this may take a moment. - + - + diff --git a/PHPUnit/Tests/TextUI/coverage-clover.phpt b/PHPUnit/Tests/TextUI/coverage-clover.phpt index 42018ad4732..7dfa8a23721 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover.phpt @@ -23,7 +23,7 @@ OK (3 tests, 3 assertions) Writing code coverage data to XML file, this may take a moment. - + diff --git a/PHPUnit/Tests/TextUI/coverage-source.phpt b/PHPUnit/Tests/TextUI/coverage-source.phpt index e517d602b26..29667241b9d 100644 --- a/PHPUnit/Tests/TextUI/coverage-source.phpt +++ b/PHPUnit/Tests/TextUI/coverage-source.phpt @@ -29,13 +29,13 @@ PHPUnit %s by Sebastian Bergmann. ... -Time: 0 seconds +Time: %i seconds OK (3 tests, 3 assertions) Writing code coverage data to XML files, this may take a moment. - + <?php diff --git a/PHPUnit/Util/Log/CodeCoverage/XML/Clover.php b/PHPUnit/Util/Log/CodeCoverage/XML/Clover.php index d9232e975f9..19963b3472f 100644 --- a/PHPUnit/Util/Log/CodeCoverage/XML/Clover.php +++ b/PHPUnit/Util/Log/CodeCoverage/XML/Clover.php @@ -151,7 +151,6 @@ public function process(PHPUnit_Framework_TestResult $result) if (is_array($files[$filename][$i])) { $classStatistics['coveredStatements']++; $count = count($files[$filename][$i]); - $classStatistics['coveredMethods']++; } else if ($files[$filename][$i] == -2) { @@ -171,6 +170,10 @@ public function process(PHPUnit_Framework_TestResult $result) } } + if ($methodCount > 0) { + $classStatistics['coveredMethods']++; + } + $lines[$method['startLine']] = array( 'count' => $methodCount, 'type' => 'method',