Skip to content

fix(tests): Standardize PHPDoc headers for test classes.#75

Merged
terabytesoftw merged 1 commit into
mainfrom
fix_mini_25
Feb 5, 2026
Merged

fix(tests): Standardize PHPDoc headers for test classes.#75
terabytesoftw merged 1 commit into
mainfrom
fix_mini_25

Conversation

@terabytesoftw
Copy link
Copy Markdown
Contributor

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

@terabytesoftw terabytesoftw added the bug Something isn't working label Feb 5, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Standardized PHPDoc headers across test classes for improved consistency and clarity about test coverage.
  • Tests

    • Enhanced test documentation to specify exception handling validation scenarios.
    • Added new test methods for validating exception handling in attribute validation tests.

Walkthrough

This pull request standardizes PHPDoc headers across 80+ test files by removing generic verification descriptions and replacing them with more specific notes about InvalidArgumentException validation behavior. A CHANGELOG entry documents this standardization. No functional code logic is modified.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Added entry for bug #75 documenting PHPDoc header standardization for test classes.
Element Test Files
tests/Element/HasAltTest.php, HasDecodingTest.php, HasHeightTest.php, HasHrefTest.php, HasLoadingTest.php, HasReferrerpolicyTest.php, HasSrcTest.php, HasSrcsetTest.php, HasUsemapTest.php, HasWidthTest.php
Removed generic "Verifies rendered output, immutability, and attribute override behavior" line; some replaced with specific InvalidArgumentException validation notes.
Form Test Files
tests/Form/HasAcceptTest.php, HasAutocompleteTest.php, HasCheckedTest.php, HasDirnameTest.php, HasDisabledTest.php, HasFormTest.php, HasListTest.php, HasMaxTest.php, HasMaxlengthTest.php, HasMinTest.php, HasMinlengthTest.php, HasMultipleTest.php, HasPatternTest.php, HasPlaceholderTest.php, HasReadonlyTest.php, HasRequiredTest.php, HasSizeTest.php, HasStepTest.php
Updated PHPDoc to remove generic test coverage descriptions and refocus documentation on InvalidArgumentException validation behavior for invalid attribute values.
Global Test Files
tests/Global/CanBeAutofocusTest.php, CanBeHiddenTest.php, HasAccesskeyTest.php, HasAriaTest.php, HasClassTest.php, HasContentEditableTest.php, HasDataTest.php, HasDirTest.php, HasDraggableTest.php, HasEventsTest.php, HasIdTest.php, HasLangTest.php, HasMicroDataTest.php, HasNonceTest.php, HasRoleTest.php, HasSpellcheckTest.php, HasStyleTest.php, HasTabIndexTest.php, HasTitleTest.php, HasTranslateTest.php
Replaced broad test coverage descriptions with specific InvalidArgumentException validation notes; some files restructured bullet points to emphasize attribute normalization, rendering, and exception handling.
Root-level Test Files
tests/HasAsTest.php, HasBlockingTest.php, HasCharsetTest.php, HasContentTest.php, HasCrossoriginTest.php, HasDownloadTest.php, HasFetchpriorityTest.php, HasHreflangTest.php, HasHttpEquivTest.php, HasImagesizesTest.php, HasImagesrcsetTest.php, HasIntegrityTest.php, HasMediaTest.php, HasNameTest.php, HasPingTest.php, HasReferrerpolicyTest.php, HasRelTest.php, HasSizesTest.php, HasSrcTest.php, HasTargetTest.php, HasTypeTest.php, HasValueTest.php
Standardized PHPDoc headers by removing generic verification descriptions and emphasizing specific InvalidArgumentException validation behavior for invalid attribute values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Test docs spring anew, so crisp and clear,
No more vague "verified" cluttering here,
InvalidArguments now take the stage,
Docblocks refined on each hoppy page! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: standardizing PHPDoc headers across all test classes. This aligns with the changeset which updates documentation in 50+ test files.
Description check ✅ Passed The description indicates this is a bugfix with no breaking changes, which relates to the standardization of PHPDoc headers throughout the test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_mini_25

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e713c4a and 2fa6eb6.

📒 Files selected for processing (71)
  • CHANGELOG.md
  • tests/Element/HasAltTest.php
  • tests/Element/HasDecodingTest.php
  • tests/Element/HasHeightTest.php
  • tests/Element/HasHrefTest.php
  • tests/Element/HasLoadingTest.php
  • tests/Element/HasReferrerpolicyTest.php
  • tests/Element/HasSrcTest.php
  • tests/Element/HasSrcsetTest.php
  • tests/Element/HasUsemapTest.php
  • tests/Element/HasWidthTest.php
  • tests/Form/HasAcceptTest.php
  • tests/Form/HasAutocompleteTest.php
  • tests/Form/HasCheckedTest.php
  • tests/Form/HasDirnameTest.php
  • tests/Form/HasDisabledTest.php
  • tests/Form/HasFormTest.php
  • tests/Form/HasListTest.php
  • tests/Form/HasMaxTest.php
  • tests/Form/HasMaxlengthTest.php
  • tests/Form/HasMinTest.php
  • tests/Form/HasMinlengthTest.php
  • tests/Form/HasMultipleTest.php
  • tests/Form/HasPatternTest.php
  • tests/Form/HasPlaceholderTest.php
  • tests/Form/HasReadonlyTest.php
  • tests/Form/HasRequiredTest.php
  • tests/Form/HasSizeTest.php
  • tests/Form/HasStepTest.php
  • tests/Global/CanBeAutofocusTest.php
  • tests/Global/CanBeHiddenTest.php
  • tests/Global/HasAccesskeyTest.php
  • tests/Global/HasAriaTest.php
  • tests/Global/HasClassTest.php
  • tests/Global/HasContentEditableTest.php
  • tests/Global/HasDataTest.php
  • tests/Global/HasDirTest.php
  • tests/Global/HasDraggableTest.php
  • tests/Global/HasEventsTest.php
  • tests/Global/HasIdTest.php
  • tests/Global/HasLangTest.php
  • tests/Global/HasMicroDataTest.php
  • tests/Global/HasNonceTest.php
  • tests/Global/HasRoleTest.php
  • tests/Global/HasSpellcheckTest.php
  • tests/Global/HasStyleTest.php
  • tests/Global/HasTabIndexTest.php
  • tests/Global/HasTitleTest.php
  • tests/Global/HasTranslateTest.php
  • tests/HasAsTest.php
  • tests/HasBlockingTest.php
  • tests/HasCharsetTest.php
  • tests/HasContentTest.php
  • tests/HasCrossoriginTest.php
  • tests/HasDownloadTest.php
  • tests/HasFetchpriorityTest.php
  • tests/HasHreflangTest.php
  • tests/HasHttpEquivTest.php
  • tests/HasImagesizesTest.php
  • tests/HasImagesrcsetTest.php
  • tests/HasIntegrityTest.php
  • tests/HasMediaTest.php
  • tests/HasNameTest.php
  • tests/HasPingTest.php
  • tests/HasReferrerpolicyTest.php
  • tests/HasRelTest.php
  • tests/HasSizesTest.php
  • tests/HasSrcTest.php
  • tests/HasTargetTest.php
  • tests/HasTypeTest.php
  • tests/HasValueTest.php
💤 Files with no reviewable changes (42)
  • tests/HasSrcTest.php
  • tests/Form/HasAcceptTest.php
  • tests/Global/HasStyleTest.php
  • tests/HasNameTest.php
  • tests/Global/HasNonceTest.php
  • tests/Form/HasFormTest.php
  • tests/Form/HasCheckedTest.php
  • tests/Form/HasStepTest.php
  • tests/HasMediaTest.php
  • tests/Form/HasRequiredTest.php
  • tests/HasDownloadTest.php
  • tests/Global/CanBeHiddenTest.php
  • tests/Element/HasUsemapTest.php
  • tests/HasImagesizesTest.php
  • tests/HasImagesrcsetTest.php
  • tests/Form/HasMultipleTest.php
  • tests/Form/HasListTest.php
  • tests/HasHreflangTest.php
  • tests/Form/HasSizeTest.php
  • tests/Global/CanBeAutofocusTest.php
  • tests/Form/HasAutocompleteTest.php
  • tests/HasSizesTest.php
  • tests/Element/HasAltTest.php
  • tests/Form/HasReadonlyTest.php
  • tests/Element/HasSrcsetTest.php
  • tests/Form/HasPlaceholderTest.php
  • tests/Global/HasAccesskeyTest.php
  • tests/Global/HasTitleTest.php
  • tests/Form/HasDisabledTest.php
  • tests/Global/HasClassTest.php
  • tests/Element/HasHeightTest.php
  • tests/Form/HasMaxTest.php
  • tests/Element/HasSrcTest.php
  • tests/Form/HasPatternTest.php
  • tests/Element/HasWidthTest.php
  • tests/HasContentTest.php
  • tests/Global/HasIdTest.php
  • tests/HasPingTest.php
  • tests/Form/HasMinTest.php
  • tests/HasIntegrityTest.php
  • tests/Element/HasHrefTest.php
  • tests/Form/HasDirnameTest.php
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-09T16:05:15.502Z
Learnt from: terabytesoftw
Repo: ui-awesome/html-attribute PR: 18
File: tests/Support/Provider/Global/ContentEditableProvider.php:32-33
Timestamp: 2026-01-09T16:05:15.502Z
Learning: Preserve the original copyright year in file headers when moving PHP source files between packages within the ui-awesome repositories (e.g., from ui-awesome/html-core to ui-awesome/html-attribute). Do not update the header year to the current year; keep the original creation year as stated in the header. This applies to all PHP files throughout the repo that are moved between packages.

Applied to files:

  • tests/HasAsTest.php
  • tests/Global/HasDraggableTest.php
  • tests/HasRelTest.php
  • tests/Global/HasLangTest.php
  • tests/HasCrossoriginTest.php
  • tests/Form/HasMaxlengthTest.php
  • tests/Global/HasAriaTest.php
  • tests/HasHttpEquivTest.php
  • tests/Form/HasMinlengthTest.php
  • tests/Element/HasDecodingTest.php
  • tests/Global/HasDataTest.php
  • tests/HasReferrerpolicyTest.php
  • tests/HasValueTest.php
  • tests/Global/HasDirTest.php
  • tests/Element/HasLoadingTest.php
  • tests/HasTargetTest.php
  • tests/Global/HasSpellcheckTest.php
  • tests/Global/HasContentEditableTest.php
  • tests/HasTypeTest.php
  • tests/HasFetchpriorityTest.php
  • tests/Global/HasRoleTest.php
  • tests/HasCharsetTest.php
  • tests/HasBlockingTest.php
  • tests/Global/HasMicroDataTest.php
  • tests/Global/HasTranslateTest.php
  • tests/Element/HasReferrerpolicyTest.php
  • tests/Global/HasEventsTest.php
  • tests/Global/HasTabIndexTest.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.5-windows-2022
  • GitHub Check: linter / Super Linter
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: linter / Super Linter
🔇 Additional comments (31)
tests/Element/HasDecodingTest.php (1)

19-32: LGTM! Documentation accurately reflects test coverage.

The updated PHPDoc correctly describes the test method testThrowInvalidArgumentExceptionWhenSettingDecodingValue (lines 93-110), which validates that invalid decoding values throw an InvalidArgumentException. The coverage list now properly maps to all four test methods in the class.

tests/HasValueTest.php (2)

23-23: LGTM! Clear and accurate description.

The updated PHPDoc bullet point accurately describes the test coverage for testSetValueAttributeValue and aligns with the standardization effort across test files.


27-28: LGTM! Appropriate copyright header addition.

The copyright line with year 2026 is appropriate for this new addition and follows the standard BSD 3-Clause License format.

CHANGELOG.md (1)

48-48: LGTM!

The changelog entry accurately documents the PHPDoc standardization work and follows the established format conventions.

tests/HasAsTest.php (1)

19-32: LGTM!

The PHPDoc header accurately reflects the test coverage. All four bullet points correspond to actual test methods in the class:

  • Immutability test ✓
  • Empty attributes test ✓
  • Attribute value setting test ✓
  • InvalidArgumentException test ✓
tests/HasReferrerpolicyTest.php (1)

19-32: LGTM!

The updated PHPDoc header correctly documents the test coverage, including the InvalidArgumentException validation test at lines 93-110.

tests/Form/HasMinlengthTest.php (1)

19-32: LGTM!

The PHPDoc accurately describes the test coverage. The InvalidArgumentException test (lines 93-116) uses a data provider for comprehensive invalid value testing.

tests/Global/HasDraggableTest.php (1)

18-31: LGTM!

The PHPDoc header correctly documents all four test coverage aspects, matching the test methods implemented in the class.

tests/Global/HasLangTest.php (1)

19-32: LGTM!

The standardized PHPDoc accurately reflects the test coverage, including the InvalidArgumentException test for invalid language values.

tests/Global/HasRoleTest.php (1)

19-32: LGTM!

The PHPDoc header is correctly standardized and accurately documents the test coverage for the HasRole trait, including the InvalidArgumentException validation.

tests/HasCrossoriginTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The test method testThrowInvalidArgumentExceptionWhenSettingCrossoriginValue() at lines 92-109 validates that invalid crossorigin values throw an InvalidArgumentException.

tests/HasFetchpriorityTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionWhenSettingFetchpriorityValue() validates this behavior.

tests/Global/HasContentEditableTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionForSettingInvalidContentEditableValue() validates this behavior.

tests/Global/HasDirTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionForSettingInvalidDirValue() validates this behavior.

tests/Element/HasReferrerpolicyTest.php (1)

26-26: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionWhenSettingReferrerpolicyValue() validates this behavior.

tests/HasBlockingTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionWhenSettingBlockingValue() validates this behavior.

tests/Global/HasTranslateTest.php (1)

25-25: LGTM!

The documentation update accurately reflects the test coverage. The corresponding test method testThrowInvalidArgumentExceptionForSettingInvalidTranslateValue() validates this behavior.

tests/Global/HasTabIndexTest.php (1)

24-24: Docblock now reflects invalid-value exception coverage.

Matches the InvalidArgumentException test below.

tests/HasTargetTest.php (1)

25-25: Docblock aligns with invalid-target exception coverage.

tests/HasHttpEquivTest.php (1)

26-26: Docblock aligns with invalid http-equiv exception coverage.

tests/HasRelTest.php (1)

26-26: Docblock aligns with invalid rel exception coverage.

tests/Global/HasMicroDataTest.php (1)

31-32: Concise provider references keep the docblock readable.

tests/Form/HasMaxlengthTest.php (2)

26-26: Docblock aligns with invalid maxlength exception coverage.


93-116: Nice coverage for invalid maxlength values and message details.

tests/Element/HasLoadingTest.php (1)

26-26: Docblock aligns with invalid loading exception coverage.

tests/HasCharsetTest.php (1)

19-32: LGTM!

The PHPDoc standardization accurately reflects the test coverage. The updated line correctly documents that invalid charset values throw an InvalidArgumentException, which matches the testThrowInvalidArgumentExceptionWhenSettingCharsetValue test method.

tests/HasTypeTest.php (1)

19-32: LGTM!

The PHPDoc update accurately documents the InvalidArgumentException behavior validated by testThrowInvalidArgumentExceptionWhenSettingTypeValue.

tests/Global/HasSpellcheckTest.php (1)

17-30: LGTM!

The PHPDoc standardization correctly documents the exception behavior tested by testThrowInvalidArgumentExceptionForSettingInvalidSpellcheckValue.

tests/Global/HasDataTest.php (1)

20-35: LGTM!

The PHPDoc updates accurately document the test coverage for key normalization, attribute rendering, and InvalidArgumentException validation for both invalid keys and values.

tests/Global/HasAriaTest.php (1)

20-36: LGTM!

The PHPDoc standardization accurately documents the comprehensive test coverage including immutability, empty state validation, key normalization, rendering, and InvalidArgumentException handling for both invalid keys and values.

tests/Global/HasEventsTest.php (1)

20-36: LGTM!

The PHPDoc standardization accurately documents the test coverage for event attributes, including empty state validation, key normalization, rendering, and comprehensive InvalidArgumentException handling for invalid keys and values across multiple methods.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@terabytesoftw terabytesoftw merged commit 7500438 into main Feb 5, 2026
47 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_25 branch February 5, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant