I\'d like to run my PHPUnit tests (or at least a subset of them) whenever a file changes on disk. Very similar to what you can do with \"grunt watch\". I have a project in which
I've created a solution to deal with this very problem: "What's Changed?" In short, there are cases where you have some really large test suites and you only want to run the tests relevant to the classes which have changed.
You can pull this in via composer by running composer require --dev icyapril/whats-changed
With this in place just run ./vendor/bin/whatschanged
and only the file changed in your last commit or in your working directory will be run. Magic!