Allow use of Constraints in ReturnValueMap
One thing that ReturnValueMap lacked was flexibility regarding the arguments the method was invoked with. It works only with exact match As a side effect, if you have floats as arguments, it may fail. As a solution, support has been added for Framework/Constraint objects.
https://github.com/sebastianbergmann/phpunit/issues/3999
Codecov Report
Merging #4000 into master will decrease coverage by
0.06%. The diff coverage is94.11%.
@@ Coverage Diff @@
## master #4000 +/- ##
============================================
- Coverage 85.5% 85.44% -0.07%
- Complexity 3849 3856 +7
============================================
Files 156 156
Lines 9720 9733 +13
============================================
+ Hits 8311 8316 +5
- Misses 1409 1417 +8
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| src/Framework/MockObject/Stub/ReturnValueMap.php | 88% <94.11%> (+4.66%) |
14 <7> (+7) |
:arrow_up: |
| .../Framework/MockObject/Builder/InvocationMocker.php | 90.62% <0%> (-3.13%) |
34% <0%> (ø) |
|
| src/Util/PHP/AbstractPhpProcess.php | 72.78% <0%> (-2.73%) |
43% <0%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2fa8d2e...6afda19. Read the comment docs.
This branch has conflicts that must be resolved.
@mstyles Hi! This is very helpful pr, check it out please
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.