skinnyBug
skinnyBug

Reputation: 299

PHPUnit does not color output

how can I enable a colored output for my tests? I tried the command phpunit --color=always file.php, but it did not work!

Thanks for help!

Upvotes: 8

Views: 3552

Answers (3)

Faruk Hossain
Faruk Hossain

Reputation: 51

If you didn't get color then you can override the phpunit.xml file on your main file.

<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">

</phpunit>

Have a good day.

Upvotes: 5

Andrew Koper
Andrew Koper

Reputation: 7249

Windows command line does not natively support colors. Download Git for Windows, run 'phpunit' from the command line in the Bash shell, and you will get colors.

Upvotes: 0

Amr Aly
Amr Aly

Reputation: 3905

it should be --colors Not --color check the docs

Upvotes: 5

Related Questions