Michiel van der Blonk
Michiel van der Blonk

Reputation: 720

phpunit less verbose output

I am running phpunit (on a laravel app) and it outputs all failing cases with their expectations. Can I run it in such a way that it only shows a string of . and F and not the rest? Or can I run it in 'tap' format with only 'ok' and 'not ok'?

I can't find any option for it.

Upvotes: 2

Views: 1149

Answers (1)

Ben Claar
Ben Claar

Reputation: 3415

phpunit itself doesn't support this. But here is a perl one-liner that will print out . for tests that pass and and E for failures:

phpunit --tap | perl -ne '$|=1;print "." if (/^ok/); print "E" if (/^not ok/)'

The $|=1 is perl magic for turning off output buffering.

Upvotes: 1

Related Questions