Commit c49a254
committed
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.1 parent 31eb80f commit c49a254
File tree
4 files changed
+24
-3
lines changed- .github
4 files changed
+24
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 | | |
0 commit comments