Improve parameter name for assertGreaterThan(), assertGreaterThanOrEqual(), assertLessThan(), and assertLessThanOrEqual()#6010
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6010 +/- ##
=========================================
Coverage 94.73% 94.73%
Complexity 6439 6439
=========================================
Files 697 697
Lines 20252 20252
=========================================
Hits 19185 19185
Misses 1067 1067 ☔ View full report in Codecov by Sentry. |
assertGreaterThan(), assertGreaterThanOrEqual(), assertLessThan(), and assertLessThanOrEqual()
|
Cherry-picked into |
|
Just wanted to note that this broke some of our tests with a dependency update, as we used named parameters with these functions. Not sure if that can be seen as a backwards compatibility break in a patch version. |
With PHPUnit, this is never a backwards compatibility break. Every source file of PHPUnit has this at the top: See https://github.com/sebastianbergmann/phpunit/blob/11.4.3/src/Framework/Assert.php#L70-L72, for example and the Backward Compatibility page. |
|
Ah apologies, I was looking for that mention/page in the documentation and could not find it, I hadn't looked in the code or on the main site. |
Resolves #5849
Improved the
$expectedparameter name for the following constraints:assertGreaterThan()assertGreaterThanOrEqual()assertLessThan()assertLessThanOrEqual()I decided to use
minimumandmaximumas parameter names as these make the comparisons clear and intuitive.