suite.xml now comes with colors=true. Under Windows, we override the
setting by forging a --no-colors. One can still force color usage
under windows by using --colors.
public static function main( $exit = true ) {
$command = new self;
+
+ if( wfIsWindows() ) {
+ # Windows does not come anymore with ANSI.SYS loaded by default
+ # PHPUnit uses the suite.xml parameters to enable/disable colors
+ # which can be then forced to be enabled with --colors.
+ # The below code inject a parameter just like if the user called
+ # phpunit with a --no-color option (which does not exist). It
+ # overrides the suite.xml setting.
+ # Probably fix bug 29226
+ $command->arguments['colors'] = false;
+ }
$command->run($_SERVER['argv'], $exit);
}
<!-- colors don't work on Windows! -->
<phpunit bootstrap="./bootstrap.php"
- colors="false"
+ colors="true"
backupGlobals="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"