Index: trunk/phase3/tests/phpunit/suite.xml |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | <!-- colors don't work on Windows! --> |
5 | 5 | <phpunit bootstrap="./bootstrap.php" |
6 | | - colors="false" |
| 6 | + colors="true" |
7 | 7 | backupGlobals="false" |
8 | 8 | convertErrorsToExceptions="true" |
9 | 9 | convertNoticesToExceptions="true" |
Index: trunk/phase3/tests/phpunit/MediaWikiPHPUnitCommand.php |
— | — | @@ -17,6 +17,17 @@ |
18 | 18 | |
19 | 19 | public static function main( $exit = true ) { |
20 | 20 | $command = new self; |
| 21 | + |
| 22 | + if( wfIsWindows() ) { |
| 23 | + # Windows does not come anymore with ANSI.SYS loaded by default |
| 24 | + # PHPUnit uses the suite.xml parameters to enable/disable colors |
| 25 | + # which can be then forced to be enabled with --colors. |
| 26 | + # The below code inject a parameter just like if the user called |
| 27 | + # phpunit with a --no-color option (which does not exist). It |
| 28 | + # overrides the suite.xml setting. |
| 29 | + # Probably fix bug 29226 |
| 30 | + $command->arguments['colors'] = false; |
| 31 | + } |
21 | 32 | $command->run($_SERVER['argv'], $exit); |
22 | 33 | } |
23 | 34 | |