PHPUnit – Run all tests in current directory

I figured out this bash command at some point when I needed to run all my PHPUnit tests in a directory at once, tweeted about it, but I keep having a hard time googling for it since.

Here it is:

for FILE in $(ls); do phpunit $FILE; done

One thought on “PHPUnit – Run all tests in current directory

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>