Created
November 25, 2014 05:19
-
-
Save glebcha/df47079c4ca4a0811d16 to your computer and use it in GitHub Desktop.
Запуск модульных тестов для PHP в Gulp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Запуск модульных тестов при изменении какого-либо php-файла в проекте | |
var phpunit = require('gulp-phpunit'); | |
var gulp = require('gulp'), | |
notify = require('gulp-notify'), | |
phpunit = require('gulp-phpunit'); | |
gulp.task('phpunit', function() { | |
var options = {debug: false, notify: true}; | |
gulp.src('app/tests/*.php') | |
.pipe(phpunit('', options)) | |
.on('error', notify.onError({ | |
title: "Ошибка!", | |
message: "Тестирование выполнено с ошибкой..." | |
})); | |
}); | |
gulp.task('default', function(){ | |
gulp.run('phpunit'); | |
gulp.watch('app/**/*.php', function(){ | |
gulp.run('phpunit'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment