J.T. Grimes
J.T. Grimes

Reputation: 4272

How do I turn off the colors in Laravel's PHPUnit task?

I'm testing under Windows and the command prompt doesn't do so well with the ANSI color codes that appear by default. How can I turn off the color display when I'm using Laravel?

Upvotes: 8

Views: 2343

Answers (2)

Aggrey Bosire
Aggrey Bosire

Reputation: 103

You can add colors in windows command prompt.Its great for spotting errors and success. I followed this http://softkube.com/blog/ansi-command-line-colors-under-windows/

Upvotes: 3

J.T. Grimes
J.T. Grimes

Reputation: 4272

The file \laravel\cli\tasks\test\stub.xml is used to generate the PhpUnit configuration file for tests. (A new configuration file is generated and deleted every time you run an artisan test task.) To turn off colors, change the first line of stub.xml from <phpunit colors="true" to <phpunit colors="false" (for Laravel 3)

Update: For Laravel 4, the file is phpunit.xml and is found in the root folder. The change is still to set colors="false".

Upvotes: 15

Related Questions