Skip to content

fix(test): stop the positional path overriding the curated unit-only suite - #221

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/unit-only-testsuite-override
Aug 24, 2026
Merged

fix(test): stop the positional path overriding the curated unit-only suite#221
rubenvdlinde merged 1 commit into
developmentfrom
fix/unit-only-testsuite-override

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

The bug

composer test:unit-only ran:

./vendor/bin/phpunit tests -c tests/phpunit-unit-only.xml

A positional path overrides the configured testsuite entirely. So the carefully curated directory list in phpunit-unit-only.xml was decorative — the script swept all of tests/ regardless, which is exactly what the curation exists to prevent.

Measured

invocation tests errors
phpunit tests -c … (as shipped) 572 7
phpunit -c … (config governs) 565 0

The seven are unit/Repair, failing on Class "Doctrine\\DBAL\\ParameterType" not found — a class that only resolves through the Nextcloud server's 3rdparty autoload. That is precisely the dependency a suite named "no Nextcloud bootstrap" exists to avoid.

The fix

Drop the argument so the config governs, which is what its comment always claimed.

unit/Repair is not lost. The main phpunit.xml suite sweeps all of tests/, and that is what CI executes in-container where doctrine resolves.

Why the comment changed too

The config now states that its list only governs when nothing is passed positionally, and records that unit/Repair is absent on purpose. Without that, the next person to notice the gap re-adds it and reintroduces the seven errors.

Found while adding the schema-application repair step (#213).

…suite

`composer test:unit-only` ran `phpunit tests -c tests/phpunit-unit-only.xml`.
A positional path OVERRIDES the configured testsuite entirely, so the curated
directory list in that config was decorative — the script swept all of tests/
regardless, which is precisely what the curation exists to prevent.

Measured today:

    with `tests`      572 tests, 7 errors
    without it        565 tests, 0 errors

The 7 are unit/Repair. They need Doctrine\DBAL\ParameterType, which only
resolves through the Nextcloud server's 3rdparty autoload — exactly the
dependency a suite named "no Nextcloud bootstrap" exists to avoid.

Dropping the argument makes the config govern, which is what its comment always
claimed. unit/Repair is not lost: the main phpunit.xml suite sweeps all of
tests/ and is what CI executes in-container, where doctrine resolves.

The config's comment now says the list only governs when nothing is passed
positionally, and records that unit/Repair is absent ON PURPOSE — otherwise the
next person to notice the gap re-adds it and reintroduces the errors.
@rubenvdlinde
rubenvdlinde merged commit 9042e91 into development Aug 24, 2026
44 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/unit-only-testsuite-override branch August 24, 2026 18:03
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/versioniq @ 51fb104

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
composer ✅ 29/29
npm ✅ 282/282
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-24 18:12 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant