Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix --coverage-php and --coverage-text.

  • Loading branch information...
commit 36bbe3207ad5469afc8e5c9d854ed8923423048f 1 parent 6ae460a
@sebastianbergmann authored
Showing with 21 additions and 12 deletions.
  1. +5 −0 ChangeLog.markdown
  2. +16 −12 PHPUnit/TextUI/TestRunner.php
View
5 ChangeLog.markdown
@@ -3,6 +3,11 @@ PHPUnit 3.6
This is the list of changes for the PHPUnit 3.6 release series.
+PHPUnit 3.6.1
+-------------
+
+* Fixed `--coverage-php` and `--coverage-text`.
+
PHPUnit 3.6.0
-------------
View
28 PHPUnit/TextUI/TestRunner.php
@@ -244,7 +244,9 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
}
if ((isset($arguments['coverageClover']) ||
- isset($arguments['reportDirectory'])) &&
+ isset($arguments['reportDirectory']) ||
+ isset($arguments['coveragePHP']) ||
+ isset($arguments['coverageText'])) &&
extension_loaded('xdebug')) {
$codeCoverage = new PHP_CodeCoverage(
NULL, $this->codeCoverageFilter
@@ -325,6 +327,16 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
}
if (isset($codeCoverage)) {
+ $title = '';
+
+ if (isset($arguments['configuration'])) {
+ $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
+
+ if (isset($loggingConfiguration['title'])) {
+ $title = $loggingConfiguration['title'];
+ }
+ }
+
if (isset($arguments['coverageClover'])) {
$this->printer->write(
"\nWriting code coverage data to XML file, this may take " .
@@ -343,16 +355,6 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
"\nGenerating code coverage report, this may take a moment."
);
- $title = '';
-
- if (isset($arguments['configuration'])) {
- $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
-
- if (isset($loggingConfiguration['title'])) {
- $title = $loggingConfiguration['title'];
- }
- }
-
$writer = new PHP_CodeCoverage_Report_HTML(
$title,
$arguments['reportCharset'],
@@ -727,7 +729,9 @@ protected function handleConfiguration(array &$arguments)
}
if ((isset($arguments['coverageClover']) ||
- isset($arguments['reportDirectory'])) &&
+ isset($arguments['reportDirectory']) ||
+ isset($arguments['coveragePHP']) ||
+ isset($arguments['coverageText'])) &&
extension_loaded('xdebug')) {
$arguments['addUncoveredFilesFromWhitelist'] = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
Please sign in to comment.
Something went wrong with that request. Please try again.