Skip to content
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 willReturnOnConsecutiveCalls to documentation #20

Closed
duncancumming opened this issue Feb 6, 2018 · 4 comments
Closed

Add willReturnOnConsecutiveCalls to documentation #20

duncancumming opened this issue Feb 6, 2018 · 4 comments

Comments

@duncancumming
Copy link

duncancumming commented Feb 6, 2018

[This duplicates this ticket https://github.com/sebastianbergmann/phpunit-documentation/issues/488 which has been closed since the documentation was moved to separate projects per language]

In phpunit-mock-objects/src/Builder/InvocationMocker.php there's a willReturnOnConsecutiveCalls method, which isn't mentioned in the PHPUnit documentation.
https://github.com/sebastianbergmann/phpunit-mock-objects/blob/master/src/Builder/InvocationMocker.php#L173

Can we get that added please?

@plucht
Copy link
Contributor

plucht commented Apr 11, 2018

These shorthand methods aren't mentioned either:

  • willReturnArgument()
  • willReturnCallback()
  • willReturnMap()
  • willReturnSelf()
  • willThrowException()

Would it make sense to add a table to the page about test doubles, which compares these methods to their equivalents (e.g. will($this->returnArgument(1)))?

@SvenBrunk
Copy link

SvenBrunk commented Jul 13, 2021

It's more than 3 years now... how about doing it? ;)
BTW: there is a variant of this mentioned in https://phpunit.readthedocs.io/en/9.5/test-doubles.html#test-doubles-stubs-examples-stubtest7-php

@seth-xdam
Copy link

This issue was resolved two years ago, but it the additional documentation was removed again two months ago in commit 2c6a4cd. The only comment on the commit is "Remove table". Why was the documentation on these additional functions deleted?

@terrylin104
Copy link

Probably it were deprecated in PHPUnit 12.
sebastianbergmann/phpunit#5425
But I didn't see any @deprecated annotation in 10.3 or later version.

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 a pull request may close this issue.

5 participants