diff --git a/Gruntfile.js b/Gruntfile.js index 3d02cea..bfa43c3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,12 +31,20 @@ module.exports = function (grunt) { php: { src: ['*.php'] }, + tests: { + src: ['tests/*.php'] + }, js: { src: ['js/*.js'] }, Gruntfile: { src: ['Gruntfile.js'] } + }, + phpunit: { + classes: { + dir: 'tests/' + } } } ); @@ -45,7 +53,9 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-phpcs'); + grunt.loadNpmTasks('grunt-phpunit'); grunt.registerTask('default', ['uglify', 'cssmin']); grunt.registerTask('lint', ['phpcs']); + grunt.registerTask('test', ['phpunit']); }; diff --git a/package.json b/package.json index 5852b67..5699d9d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "grunt-contrib-cssmin": "~0.10.0", "grunt-contrib-uglify": "~0.6.0", "grunt-contrib-watch": "~0.6.1", - "grunt-phpcs": "~0.4.0" + "grunt-phpcs": "~0.4.0", + "grunt-phpunit": "~0.3.6" }, "engines": { "node": "~0.10.29"