Skip to content

Commit

Permalink
Fix phpspec#332: Calling original method is unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Nov 3, 2021
1 parent d86dfc2 commit d441064
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,10 @@ $em->flush()->shouldHaveBeenCalled();
```

Such manipulation with doubles is called spying. And with Prophecy it just works.


## FAQ

### Can I call the original methods on a prophesized class?

Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored.

0 comments on commit d441064

Please sign in to comment.