Closed camilledejoye closed 3 years ago
The current implementation of MethodProphecy::willYield() does not allow to specify a return value for the mocked generator.
MethodProphecy::willYield()
The proposal here is to add an optional parameter allowing to define the return value:
$prophecy->createGenerator()->willYield(['foo', 'bar'], 'return value');
Looks good, thank you!
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: