Adjust Core phpunit.xml to make it work for Contrib
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3486466. -->
Reported by: [cmlara](https://www.drupal.org/user/1790054)
Related to !290 !286
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3480767" title="Status: Closed (fixed)">#3480767: browser_output is empty when testing with Drupal 11 and _phpunit_concurrent=0</a></span> changed the phpunit runner from executing with no phpunit.xml to using the core phpunit.xml.</p>
<p>This change causes a behavior change by specifying additional configuration.</p>
<p>One of the values is adding the Core directories as paths that should be included in code coverage analysis when they previously would not.</p>
<p>In several modules (S3FS, TFA, Vault, RabbitMq) code coverage is currently enabled with the intent that only the module paths should be included (both for increased test performanced/decreased time, and the fact the module tests are not intended to cover core). This has caused a code coverage reduction (and hours of lost developer time attempting to find the cause).</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Checkout <a href="https://git.drupalcode.org/project/vault/-/merge_requests/19">https://git.drupalcode.org/project/vault/-/merge_requests/19</a></p>
<p>Run using the firecow runner against 1.6.3 and 1.6.4.</p>
<p>gitlab_templates: 1.6.3</p>
<pre>phpunit > Code Coverage Report:<br>phpunit > 2024-11-09 16:26:48<br>phpunit > <br>phpunit > Summary:<br>phpunit > Classes: 6.67% (1/15)<br>phpunit > Methods: 53.09% (43/81)<br>phpunit > Lines: 80.15% (432/539)</pre><p>gitlab_templates: 1.6.4</p>
<pre>phpunit > Code Coverage Report:<br>phpunit > 2024-11-09 16:24:10<br>phpunit > <br>phpunit > Summary:<br>phpunit > Classes: 0.03% (1/3321)<br>phpunit > Methods: 0.24% (44/18454)<br>phpunit > Lines: 0.31% (434/141321)</pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Revert <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3480767" title="Status: Closed (fixed)">#3480767: browser_output is empty when testing with Drupal 11 and _phpunit_concurrent=0</a></span> (per API policy) and find alternative fix that does not depend upon adding phpunit.xml to the test script.<br>
Consider adding phpunit.xml in v2 of GitLab Templates and at same time add a check for '--no-configuration' flag.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
> Related issue: [Issue #3417987](https://www.drupal.org/node/3417987)
issue