Skip to content

Commit

Permalink
Merge pull request #546 from danepowell/patch-1
Browse files Browse the repository at this point in the history
Fix #332: Calling original method is unsupported
  • Loading branch information
stof committed Dec 8, 2021
2 parents d86dfc2 + d441064 commit aff648c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
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 aff648c

Please sign in to comment.