Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUnit does not color output

Tags:

phpunit

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!

like image 790
skinnyBug Avatar asked May 21 '26 06:05

skinnyBug


2 Answers

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

like image 88
Amr Aly Avatar answered May 28 '26 09:05

Amr Aly


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.

like image 22
Faruk Hossain Avatar answered May 28 '26 08:05

Faruk Hossain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!