Skip to content

Commit

Permalink
Added code coverage generation to phake tests task.
Browse files Browse the repository at this point in the history
  • Loading branch information
trq committed May 19, 2012
1 parent 2beaf9b commit 8a70d82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
tests/log/*
tests/coverage
vendor
11 changes: 9 additions & 2 deletions Phakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ group('dev', function() {

desc('Run the unit tests');
task('tests', function($args) {
$report = ' ';
if (isset($args['coverage'])) {
if (!is_dir('tests/coverage')) {
mkdir('tests/coverage');
}
$report = ' --coverage-html tests/coverage ';
}
if (isset($args['verbose'])) {
system('phpunit --colors --debug --verbose --configuration tests/phpunit.xml');
system('phpunit' . $report . '--colors --debug --verbose --configuration tests/phpunit.xml');
} else {
system('phpunit --colors --configuration tests/phpunit.xml');
system('phpunit' . $report . '--colors --configuration tests/phpunit.xml');
}
});

Expand Down

0 comments on commit 8a70d82

Please sign in to comment.