From 064fef5d8a43ce78d5b36ba8eeb2349830c69ba9 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 10 Dec 2021 18:12:00 +0100 Subject: [PATCH] Added comment to explain why API tests coverage is generated the way it is --- config/test/test_config.global.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/test/test_config.global.php b/config/test/test_config.global.php index d5e5476c..ab7a910f 100644 --- a/config/test/test_config.global.php +++ b/config/test/test_config.global.php @@ -119,6 +119,8 @@ return [ 'name' => 'dump_coverage', 'path' => '/api-tests/stop-coverage', 'middleware' => middleware(static function () use (&$coverage) { + // TODO I have tried moving this block to a listener so that it's invoked automatically, + // but then the coverage is generated empty ¯\_(ツ)_/¯ if ($coverage) { // @phpstan-ignore-line $basePath = __DIR__ . '/../../build/coverage-api';