Last active
January 31, 2021 09:57
-
-
Save BruceGitHub/03434f39e80b32d8d4deb70efb4bd546 to your computer and use it in GitHub Desktop.
How run phpunit test after change file with Node+Gulp
This file contains 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
var gulp = require('gulp'), | |
util = require('util'), | |
exec = require('child_process').exec; | |
gulp.task('phpunit', function() { | |
exec('phpunit -c my_project_name/App', function(error, stdout) { | |
util.puts(stdout); | |
}); | |
}); | |
gulp.task('default',['phpunit'], function() { | |
gulp.watch([ | |
'my_project_name/src/AppBundle/*/*.php', | |
'my_project_name/src/*.php', | |
'my_project_name/src/*.xml', | |
'my_project_name/src/*.yml', | |
'!my_project_name/app/bin/*/**' | |
], ['phpunit']); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment