-
-
Save textarcana/456739 to your computer and use it in GitHub Desktop.
PHP continuous testing with Watchr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prereqs: | |
# * Ruby | |
# * gem install watchr | |
# Usage: | |
# copy autounit to php project directory | |
# run watchr autounit | |
watch('test/.*Test\.php') do |md| | |
puts "\e[H\e[2J" #clear console | |
system("phpunit #{md[0]}") | |
end | |
watch('lib/(.*)\.php') do |md| # runs test/Class/* whenever lib/class.php is changed | |
puts "\e[H\e[2J" #clear console | |
testpath = md[1].sub(/./) { |s| s.upcase } | |
system("phpunit test/#{testpath}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment