Skip to content

test: raise the coverage to 91.0 % - #17

Merged
ogorzalka merged 2 commits into
mainfrom
cov/attributes
Nov 13, 2026
Merged

ogorzalka merged 2 commits into
mainfrom
cov/attributes

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Raises the coverage of the package from 82.1 % to 91.0 % (331 of 403 lines to 367; measured locally with PHP 8.4 and pcov, equal to the recorded ratchet 82.13), with tests only (src/ and vocabulary/ are untouched).

29 tests in tests/Unit/DeclarationAttributesTest.php for attributes that had no direct test. Most attributes are promoted constructors, so one line each, covered as soon as they are built, which is why a small number of tests moves the figure. The tests also pin the behaviour of Access and BindingFieldType.

36 lines still count as uncovered, all in vocabulary/ (Access, Every, Interval, BindingFieldType): pcov looks at src/ by default, so vocabulary/ is outside the measured directory but inside the denominator, although Every and Interval already had passing tests. With -d pcov.directory=. the total would be about 100 % (deduced, not run). Everything under src/ is at 100 %.

rector has no configuration in this package, so it was not run. The ratchet in .harness.json goes from 82.13 to 91. 362 tests pass (1 skipped, as before) in random orders; Pint, PHPStan and tests/Arch.php are clean.

@ogorzalka
ogorzalka merged commit e5dce5d into main Nov 13, 2026
15 checks passed
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