Reputation: 6689
I have been using autotest for unit testing in ruby. Is there an equivalent for PHP that will run my unit tests after my code has been updated? I am using PHPUnit and Eclipse.
Upvotes: 5
Views: 1944
Reputation: 28064
I use the entr
command for this kind of task. It receives a list of files and runs the given command when one of the file changes.
Example:
find src test -name "*.php" -type f | entr phpunit
The good thing about entr
is that it's language- and command-agnostic, I can use it for phpunit, JavaScript unit test, linting, etc. Also, compared to watchr
, I only have to install one command instead of a ruby runtime.
Upvotes: 0
Reputation: 32645
I use grunt and grunt-phpunit to watch my application and run the tests when I change the files.
http://michaelcalkins.com/post/71024731696/run-phpunit-tests-continuously-using-grunt
Upvotes: 0
Reputation: 524
that is watcher for files and entities
can run tests for changed entities/domains and tests too
Upvotes: 3
Reputation: 86
You could use watchr to watch your directory and run phpunit whenever a file changes.
http://github.com/mynyml/watchr
Upvotes: 7