File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 35
35
36
36
<report >
37
37
<clover outputFile =" build/logs/clover.xml" />
38
+ <html outputDirectory =" build/coverage/html" highLowerBound =" 80" />
39
+ <text outputFile =" build/coverage/text/coverage.txt" />
38
40
</report >
39
41
</coverage >
40
42
Original file line number Diff line number Diff line change @@ -110,20 +110,23 @@ You can run the tests without running the live database and the live cache tests
110
110
111
111
## Generating Code Coverage
112
112
113
- To generate coverage information, including HTML reports you can view in your browser,
114
- you can use the following command:
113
+ The coverage reports are generated by default after the execution of tests. These reports
114
+ include a textual overview and HTML reports which can be opened in a browser.
115
+
116
+ The text file can be found at ** build/coverage/text/coverage.txt** .
117
+ The HTML files can be viewed by opening ** build/coverage/html/index.html** in your favorite browser.
118
+
119
+ Alternatively you can use the following command:
115
120
116
121
``` console
117
- ./phpunit --colors --coverage-text=tests /coverage.txt --coverage-html=tests /coverage/ -d memory_limit=1024m
122
+ ./phpunit --colors --coverage-text=build /coverage/text/coverage .txt --coverage-html=build /coverage/html / -d memory_limit=1024m
118
123
```
119
124
120
125
This runs all of the tests again collecting information about how many lines,
121
126
functions, and files are tested. It also reports the percentage of the code that is covered by tests.
122
127
It is collected in two formats: a simple text file that provides an overview as well
123
128
as a comprehensive collection of HTML files that show the status of every line of code in the project.
124
129
125
- The text file can be found at ** tests/coverage.txt** .
126
- The HTML files can be viewed by opening ** tests/coverage/index.html** in your favorite browser.
127
130
128
131
## PHPUnit XML Configuration
129
132
You can’t perform that action at this time.
0 commit comments