Skip to content

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