codedungeon
1/20/2014 - 3:56 AM

Gulpfile for executing PHPUnit

Gulpfile for executing PHPUnit

/* Gulpfile
 * Mike Erickson
 */

var gulp    = require('gulp'),
	  exec    = require('gulp-exec');

gulp.task('phpunit', function() {
	gulp.src('./**/**')
		  .pipe(exec('./vendor/bin/phpunit'));
});

gulp.task('default', function() {
	gulp.run('phpunit');

	// watch JS files
	gulp.watch('./app/tests/*Test.php', function(event){
		gulp.run('phpunit');
	});
});