You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function () { return (bool)getenv('CODE_COVERAGE_ENABLED'); },
23
24
__DIR__ . '/../var/coverage',
24
25
__DIR__ . '/../phpunit.xml.dist'
25
26
);
26
27
27
-
// Run your web application now
28
+
// Run your web application now...
28
29
29
-
$liveCodeCoverage->stopAndSave();
30
+
// This will save and store collected coverage data:
31
+
$shutDownCodeCoverage();
30
32
```
31
33
32
-
- The first argument is the directory where all the collected coverage data will be stored (`*.cov` files). This directory should already exist and be writable.
34
+
- The first argument passed to `LiveCodeCoverage::bootstrap()` is a callable that will be used to determine if code coverage is enabled at all. The example shows how you can use an environment variable for that. Make
35
+
- The second argument is the directory where all the collected coverage data will be stored (`*.cov` files). If this directory doesn't exist yet, it will be created.
33
36
- The second argument is the path to a PHPUnit configuration file. Its `<filter>` section will be used to configure the code coverage whitelist. For example, this `phpunit.xml.dist` file might look something like this:
34
37
35
38
```xml
@@ -50,12 +53,12 @@ If you don't provide a PHPUnit configuration file, no filters will be applied, s
50
53
If your application is a legacy application which `exit()`s or `die()`s before execution reaches the end of your front controller, the bootstrap should be slightly different:
0 commit comments