开发者

Autotest equivalent for PHP?

开发者 https://www.devze.com 2022-12-17 00:06 出处:网络
I have been using autotest for unit开发者_如何学Go 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.You could

I have been using autotest for unit开发者_如何学Go 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.


You could use watchr to watch your directory and run phpunit whenever a file changes.

http://github.com/mynyml/watchr


hot phpunit runner

that is watcher for files and entities

can run tests for changed entities/domains and tests too


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消