Gulpfile.js 685 Bytes
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
var gulp    = require("gulp");
var notify  = require("gulp-notify");
var run     = require("gulp-run");
var phpunit = require("gulp-phpunit");

gulp.task("tests", function ()
{
    gulp.src("./tests/TestBase.php")
		    .pipe( run("clear") )
		        .pipe( phpunit("phpunit", {
		            debug: false,
		            notify: true
		        }))
		    .on("error", function() {
		        run("notify-send 'Tests Failed' 'Got some problems buddy.'").exec();
		    })
        	.pipe( run("notify-send 'Tests Passed' 'Nailed it.'"));
});

gulp.task("watch", function()
{
    gulp.watch([ "./src/**/*.php", "./tests/**/*"], [ "tests" ]);
})

gulp.task("default", [ "tests", "watch" ]);