i3zuwg
Last Updated: February 25, 2016
·
1.118K
· mbunge
Innercircle

PHPUnit with gulp 3.5.0

Run PHPUnit with Gulp.

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']);
Say Thanks
Respond