Skip to content

Instantly share code, notes, and snippets.

@mbunge
Created January 29, 2014 13:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mbunge/8688386 to your computer and use it in GitHub Desktop.
PHPUnit with latest gulp 3.5.0 +
var gulp = require('gulp');
var sys = require('sys');
var gutil = require('gulp-util');
var exec = require('gulp-exec');
gulp.task('phpunit', function() {
gulp.src('./tests').pipe(
exec('phpunit --bootstrap tests/bootstrap.php -c tests/phpunit.xml tests/', function(error, stdout){
sys.puts(stdout);
return false;
})
);
});
gulp.task('watch', function () {
gulp.watch('**/*.php', ['phpunit']);
});
gulp.task('default', ['watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment