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
Add option to allow\disallow mocking methods unnecessarily for default expectations defined through quick definitions #1063
Conversation
0ab1e3c
to
2b6c311
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @danydev, thanks for this PR! My biggest issue with it are the really long constant names that reduce the readability of the code, so I left some feedback to try and make it a bit better. What do you think?
I keep getting lost between the issue (#1056) and this PR... Regarding the API and it's extensibility, this is a very narrow use case, so I wouldn't worry about it. Mockery has been going a long time and you're the first to request this, so I'm not overly concerned about making the feature extensible going forward. The names do look messy, maybe introduce a small object to wrap the quick definition settings? Mockery::configuration()
->quickDefinitions()
->shouldBeCalledAtLeastOnce(); // pass a boolean to set, no args to get |
2b6c311
to
d621e43
Compare
@davedevelopment just performed the changes! |
Generally I agree, but I tend to let it slide for what I would consider to be PHP's lack of (reasonable) support for the Uniform access principle. Will give @robertbasic a day to object, but I'm happy to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks much better now, thanks @danydev!
@danydev one last request, please could you add a quick note to the CHANGELOG.md file? Thanks |
d621e43
to
fbb6697
Compare
@davedevelopment done |
fbb6697
to
a9592ed
Compare
…t expectations set through quick definitions