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

imp: willYield handle Generator::getReturn() #507

Merged

Conversation

camilledejoye
Copy link
Contributor

@camilledejoye camilledejoye commented Oct 24, 2020

The current implementation of MethodProphecy::willYield() does not allow to specify a return value for the mocked generator.

The proposal here is to add an optional parameter allowing to define the return value:

$prophecy->createGenerator()->willYield(['foo', 'bar'], 'return value');

@ciaranmcnulty
Copy link
Member

Looks good, thank you!

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.

None yet

2 participants