Added comment to explain why API tests coverage is generated the way it is

This commit is contained in:
Alejandro Celaya 2021-12-10 18:12:00 +01:00
parent 6aebaa94af
commit 064fef5d8a

View file

@ -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';