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:

[bash]
for FILE in $(ls); do phpunit $FILE; done
[/bash]

Advertisements

Published by

Dan Bernardic

A Winnipeg Web programmer. Member of the FarmLink Marketing Solutions and Farm At Hand team. Experienced with Web technologies, e.g. HTML5, CSS, ( Server-side ) JS, PHP, WordPress, MVC, etc.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s