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 disable spy behavior #509

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jean85
Copy link
Contributor

@Jean85 Jean85 commented Oct 27, 2020

Fix #508

This PR is incomplete, I don't know how to fix the new specs.

$objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method)));
$objectProphecy->getMethodProphecies('getName')->willReturn(array($method));

$this->makeUnexpectedCallsFailFast(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the test that got deleted in #120, I tried to revert it back but this line doesn't seem to work; I need to call that method as a new precondition to make it pass, how should I do it?

@ciaranmcnulty
Copy link
Member

How compatible is this with #518?

@Jean85
Copy link
Contributor Author

Jean85 commented Mar 17, 2021

@ciaranmcnulty I've already commented there: #518 (comment)

We're battling the same issue in opposite directions: Prophecy's behavior is unclear when the subject of the prophecy has return types declared on its methods. We should discuss how to proceed, probably in #472

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.

[DX] Mocks should fail immediately
2 participants