Peridot is highly extensible, highly enjoyable, BDD testing framework for PHP.
- PHP 5.4 or later
- Peridot
- Leo (optional)
- Xdebug (optional)
- PHP_CodeCoverage (optional)
$ npm install --save-dev gulp-peridot
add it to your gulpfile.js
:
var peridot = require('gulp-peridot');
gulp.task('peridot', function () {
return gulp.src('specs') // <= test specs directory
.pipe(peridot('/vendor/bin/peridot', {
filter: 'foo.*.spec.php',
configurationFile: 'bar-config.php'
coverageText: true,
coverageHtml: 'cov-dir',
coverageBlacklist: [ 'libs', 'bar-config.php' ],
coverageWhitelist: []
}));
});
Type: String
The path to the desired Peridot executable.
- If not supplied, the defeault path will be
./vendor/bin/peridot
or$(which peridot)
.
Type: Boolean
Do not show report.
Type: Boolean
Executes dry run (doesn't actually execute tests, just echo command that would be executed).
Type: String
Define a path to an peridot configuration file (supply full path and filename).
Need Xdebug and PHP_CodeCoverage.
Type: String
Define a path to HTML code coverage report directory.
Type: String
Define a path to XML code coverage report directory.
Type: String
Define a path to Clover code coverage report file.
Type: String
Define a path to PHP code coverage report file.
Type: String
Define a path to Crap4j code coverage report file.
Type: Boolean
Show code coverage report to stdout.
Type: Array(String)
Add code coverage blacklist file/directory.
Local/global composer and gulp-peridot directories are automatically added to blacklist.
Type: Array(String)
Add code coverage whitelist file/directory.
Type: String
Run tests matching pattern.
Type: Boolean
Use colors in output.
Type: Boolean
Stop execution upon first error or failure.
Type: String
Specify which reporter to use.
gulp.task('peridot', function () {
return gulp.src('specs')
.pipe(peridot('/vendor/bin/peridot', {
reporter: 'face'
}));
});
- First release (Inspired by gulp-phpunit)
© 2015 ktty1220