I am defining a phpunit.xml configuration file for my unit tests. In this file, I instruct you to show colors in unit test results as follows:
<phpunit
...
colors="true"
...
</phpunit>
When I run tests on the command line, everything is fine, except that I do not get green and red colors in the results.
If I delete the configuration file and use the option --color=alwayson the command line, I get a result with colors.
In the configuration file, I'm already trying to change colors="true"to colors="always"without result.
Is there a problem with my configuration file?
Here is my phpunit.xml configuration file:
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.1/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="PHPUnit_TextUI_ResultPrinter"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
stopOnRisky="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="false">
<testsuites>
<testsuite name="examples">
<directory>/home/miguelbgouveia/Documents/projects/joomla/tests</directory>
<file>test_example.php</file>
</testsuite>
</testsuites>
</phpunit>
And the phpunit version is 5.1.2