Skip to content

test doubles: stubs: list available short hands #243

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

Closed
wants to merge 1 commit into from
Closed

test doubles: stubs: list available short hands #243

wants to merge 1 commit into from

Conversation

wiese
Copy link
Contributor

@wiese wiese commented Jul 14, 2021

List the (convenience) short hands and their longer counterparts.

IDEs should do a fine job suggesting those already, but having them
show up on readthedocs would be great.

Maybe it would make more sense to only mention the short hands after
their long syntax is explained (as happens for quite a few of them
in the paragraphs thereafter), but I placed the list of available
short hands where it was explained for willReturn($value) so far.

Long call syntax as seen in https://github.com/sebastianbergmann/phpunit-mock-objects/blob/0dfddc236629eb7ead4df2dfa3d79d548e011a3b/tests/MockObjectTest.php

Resolves #20

List the (convenience) short hands and their longer counterparts.

IDEs should do a fine job suggesting those already, but having them
show up on readthedocs would be great.

Maybe it would make more sense to only mention the short hands after
their long syntax is explained (as happens for quite a few of them
in the paragraphs thereafter), but I placed the list of available
short hands where it was explained for `willReturn($value)` so far.

Long call syntax as seen in https://github.com/sebastianbergmann/phpunit-mock-objects/blob/0dfddc236629eb7ead4df2dfa3d79d548e011a3b/tests/MockObjectTest.php

Resolves #20
@wiese
Copy link
Contributor Author

wiese commented Jul 14, 2021

I have been watching #20 for ages, now created a commit (using the github UI) according to what I understand @plucht meant and what I would find helpful.

The contributing guidelines make me reluctant to create a full-fledged PR ("Run make html i.e. installing sphinx, which branch to target for such an addition)" – maybe someone who knows a little more about the customs of this project can first chime in if this is going roughly in the right direction. Thanks!

@sebastianbergmann
Copy link
Owner

Cherry-picked into 7.5 and merged from there to 8.5, 9.5, and master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add willReturnOnConsecutiveCalls to documentation
2 participants