From d05962b5865664235ca7fe3cc7b66b0eb37d91c5 Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Tue, 23 Apr 2024 15:35:11 +0200 Subject: [PATCH] Enhance how the configuration is of code coverage --- example/phpunit-symfony/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/example/phpunit-symfony/README.md b/example/phpunit-symfony/README.md index 924cf67..245c097 100644 --- a/example/phpunit-symfony/README.md +++ b/example/phpunit-symfony/README.md @@ -115,6 +115,13 @@ App\Dice\Dice We can generate code coverage as HTML. To do so we update the configuration file `phpunit.xml.dist` with a report instruction on the code coverage. +```xml + + + + +``` + You should place that section within the `` and ``. You can see a complete configuration filen in [`phpunit.xml.dist`](phpunit.xml.dist). ```xml @@ -127,6 +134,12 @@ You should place that section within the `` and ``. You can ``` +You can now execute the test suite and generate the code coverage report. + +``` +XDEBUG_MODE=coverage bin/phpunit +``` + When the test suite is executed and the code coverage reports are generated it might look like this in the output. ```