Skip to content

Conversation

@laloona
Copy link
Contributor

@laloona laloona commented Dec 31, 2025

I extended the unit tests

  • assertGreaterThan
  • assertGreaterThanOrEqual
  • assertLessThan
  • assertLessThanOrEqual

with handling of equality to document the difference between assertGreaterThan / assertGreaterThanOrEqual and assertLessThan / assertLessThanEqual.

…uals, assertLessThan or assertLessThanOrEquals
@sebastianbergmann sebastianbergmann added type/tests Tests! Yes, PHPUnit, too, needs tests. feature/assertion Issues related to assertions and expectations labels Dec 31, 2025
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.99%. Comparing base (964b11a) to head (5c048c1).
⚠️ Report is 43 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6456   +/-   ##
=========================================
  Coverage     95.99%   95.99%           
  Complexity     7306     7306           
=========================================
  Files           793      793           
  Lines         22483    22483           
=========================================
  Hits          21582    21582           
  Misses          901      901           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebastianbergmann sebastianbergmann force-pushed the main branch 4 times, most recently from 8e693d6 to 2d1b2b2 Compare December 31, 2025 16:41
@staabm
Copy link
Contributor

staabm commented Jan 1, 2026

Local data-providers don't need retur types declared.

Phpstan will infer them based on the hardcoded values in the method body

@laloona
Copy link
Contributor Author

laloona commented Jan 3, 2026

Thanks for the note. I followed the style used in other tests of this type for consistency. If you prefer local data providers without return types, I’m happy to adjust.

@staabm
Copy link
Contributor

staabm commented Jan 3, 2026

Its a pretty new phpstan feature - thats why pre-existing tests still have this types.

Whether its fine to not document returns need to be decided by sebastian though

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

Labels

feature/assertion Issues related to assertions and expectations type/tests Tests! Yes, PHPUnit, too, needs tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants