-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPUnit config: set up to allow for recording code coverage
The `forceCoversAnnotation` attribute will prevent code coverage from being recorded for tests without a `@covers` tag. As for recording the code coverage: By default, a code coverage text summary will be shown and a `clover.xml` file will be generated in a `build/logs` directory. The clover file can be used to generate code coverage reports via a service like Coveralls. For local development, the `clover.xml` is not very human readable-friendly and the summary is a little too minimal, so an HTML report would be better. To that end, a `coverage-local` script has been added to the `composer.json` to make it straight forward for contributors to generate the HTML report. The HTML report will be placed in a `build/coverage-html` directory. The `build` directory is now excluded via the `.gitignore` file.
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/phpcs.xml | ||
/phpunit.xml | ||
.phpunit.result.cache | ||
/build/ | ||
.idea/* | ||
/vendor/ | ||
composer.lock | ||
|
This file contains 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
This file contains 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