diff --git a/ChangeLog.md b/ChangeLog.md index a65078c0d4e..19eba2b0f53 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,4 +9,5 @@ PHPUnit 3.8.0 * A test will now fail in strict mode when it uses the `@covers` annotation and code that is not expected to be covered is executed. * Implemented #711: `coverage-text` now has an XML `showOnlySummary` option. * Fixed: `phpt` test cases now use the correct php binary when executed through wrapper scripts. +* Implemented #719: The `--stderr` flag now respects `--colors` and `--debug`. * PHPUnit 3.8 is only supported on PHP 5.4.7 (or later). diff --git a/PHPUnit/TextUI/Command.php b/PHPUnit/TextUI/Command.php index d6e0305df15..59f573b3145 100644 --- a/PHPUnit/TextUI/Command.php +++ b/PHPUnit/TextUI/Command.php @@ -415,11 +415,7 @@ protected function handleArguments(array $argv) break; case '--stderr': { - $this->arguments['printer'] = new PHPUnit_TextUI_ResultPrinter( - 'php://stderr', - isset($this->arguments['verbose']) ? $this->arguments['verbose'] : FALSE - ); - } + $this->arguments['stderr'] = true; } break; case '--stop-on-error': { @@ -512,6 +508,15 @@ protected function handleArguments(array $argv) } } + if (isset($this->arguments['stderr'])) { + $this->arguments['printer'] = new PHPUnit_TextUI_ResultPrinter( + 'php://stderr', + isset($this->arguments['verbose']) ?: FALSE, + isset($this->arguments['colors']) ?: FALSE, + isset($this->arguments['debug']) ?: FALSE + ); + } + $this->handleCustomTestSuite(); if (!isset($this->arguments['test'])) {