php - Run PHPUnit tests on change -


i'd run phpunit tests (or @ least subset of them) whenever file changes on disk. similar can "grunt watch". have project in have both js , php, , using grunt. there shell out phpunit have run on top of js tests using grunt watch. while works fine, seems awful lot of hassle in php project. i'd need introduce grunt, , add dependency on node. plus have lot of such php projects. more simple solution in order.

i've wrote blog post on while back: http://edorian.github.io/2010-03-11-running-your-unit-tests-everytime-you-save-a-file/

the basic command be:

pywatch phpunit . 

which mean "monitor files in directory , below changes , if 1 of them changes run phpunit".

if have lot of files in there (assets etc) can slow better/faster version is:

find -name '*.php' | xargs pywatch "./runsuite.sh" 

which monitors changes .php files


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -