New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strict mocking #3158
Labels
Comments
sebastianbergmann
added
type/enhancement
A new idea that should be implemented
feature/test-doubles
Stubs and Mock Objects
labels
Jun 4, 2018
@epdenouden I do not think that this has anything to do with |
@sebastianbergmann Alright, I will continue on the other PR then. Lemme know if anything comes up and I'll take a look tonight |
Any news here? |
This was referenced Feb 12, 2020
I'm also curious about the status of this. Has there been any developments? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Hi, by default phpunit mock object allows you to call any methods: mocked and real.
You should declare a lot of "never" expectations in test cases for complete check your code.
When your covered code is changing, for example added new call of depended mock, tests not fail.
This behavior is error source.
Example:
I'm trying to create constraint, which denies calling not mocked methods.
Is there way to get method name matchers without reflection, or call
InvocationMocker::matches
without invocation of other constraints?I also tried to override InvocationMocker and set it to mockObject by reflection but it's dirty hack((
Could you suggest some other way for my case?
The text was updated successfully, but these errors were encountered: