-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
29 lines (26 loc) · 821 Bytes
/
gulpfile.js
File metadata and controls
29 lines (26 loc) · 821 Bytes
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
26
27
28
29
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function() {
gulp.src('spec/**/*.php')
.pipe(phpspec( '', {
clear: true,
notify: true,
verbose: 'v'
}))
.on('error', notify.onError({
title: 'PHP: FAILED!',
message: 'Your tests have failed!',
icon: __dirname + '/spec/failed.jpg'
}))
.pipe(notify({
title: 'PHP: Success',
message: 'All tests have returned green!',
icon: __dirname + '/spec/success.jpg'
}));
});
gulp.task('watch', function() {
gulp.watch(['spec/**/*.php', '*.php', '**/*.php'], ['test']);
});
gulp.task('default', ['test', 'watch']);