File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ using `PHPUnit`_. Create a PHPUnit configuration file in
26
26
<directory >./tests</directory >
27
27
</testsuite >
28
28
</testsuites >
29
+ <filter >
30
+ <whitelist processUncoveredFilesFromWhitelist =" true" >
31
+ <directory suffix =" .php" >./src</directory >
32
+ </whitelist >
33
+ </filter >
29
34
</phpunit >
30
35
31
36
This configuration defines sensible defaults for most PHPUnit settings; more
@@ -180,6 +185,12 @@ Open ``example.com/cov/src/Simplex/Framework.php.html`` in a browser and check
180
185
that all the lines for the Framework class are green (it means that they have
181
186
been visited when the tests were executed).
182
187
188
+ Alternatively you can output the result directly to the console:
189
+
190
+ .. code-block :: bash
191
+
192
+ $ phpunit --coverage-text
193
+
183
194
Thanks to the simple object-oriented code that we have written so far, we have
184
195
been able to write unit-tests to cover all possible use cases of our
185
196
framework; test doubles ensured that we were actually testing our code and not
You can’t perform that action at this time.
0 commit comments