PHPUnit enable Color Output

2019-08-15 17:55发布

问题:

I am running PHPUnit from command line on Windows 7. I tried to enable color output via phpunit --color. But it still display same, no color output. How can I get color output of PHPUnit from command line on Win7?

回答1:

You will have to use http://softkube.com/blog/ansi-command-line-colors-under-windows or get some sane console like conemu https://code.google.com/p/conemu-maximus5/

Also, I suggest to download git for windows and use bash as your default shell.



回答2:

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