Skip to content

Fix variadic function as callback#5944

Merged
sebastianbergmann merged 6 commits intosebastianbergmann:10.5from
6b7562617765726c6f73:fix_with_callback_and_variadic_params
Sep 9, 2024
Merged

Fix variadic function as callback#5944
sebastianbergmann merged 6 commits intosebastianbergmann:10.5from
6b7562617765726c6f73:fix_with_callback_and_variadic_params

Conversation

@kubawerlos
Copy link
Copy Markdown
Contributor

Fixes #5891

I'm really open to a better title for this PR.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 8, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.14%. Comparing base (0143f26) to head (30f0fff).
Report is 6 commits behind head on 10.5.

Files with missing lines Patch % Lines
src/Framework/MockObject/Generator/MockMethod.php 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               10.5    #5944      +/-   ##
============================================
- Coverage     94.14%   94.14%   -0.01%     
- Complexity     6436     6443       +7     
============================================
  Files           678      678              
  Lines         19423    19438      +15     
============================================
+ Hits          18286    18300      +14     
- Misses         1137     1138       +1     

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

@kubawerlos kubawerlos marked this pull request as ready for review September 8, 2024 20:08
@sebastianbergmann sebastianbergmann added type/bug Something is broken feature/test-doubles Test Stubs and Mock Objects labels Sep 9, 2024
Comment thread src/Framework/Constraint/Callback.php
Comment thread src/Framework/MockObject/Generator/MockMethod.php Outdated
@sebastianbergmann sebastianbergmann merged commit ab2cd21 into sebastianbergmann:10.5 Sep 9, 2024
@kubawerlos kubawerlos deleted the fix_with_callback_and_variadic_params branch September 9, 2024 05:54
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature/test-doubles Test Stubs and Mock Objects type/bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Callback constraint does not handle variadic arguments correctly when used for mock object expectations

2 participants