Reputation: 720
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
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