Skip to content

Instantly share code, notes, and snippets.

@mlively
Created August 14, 2011 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlively/1145400 to your computer and use it in GitHub Desktop.
Save mlively/1145400 to your computer and use it in GitHub Desktop.
Partial mock with no constructor call
<?php
$mock = Phake::mock('PhakeTest_MockedClass', Phake::ifUnstubbed()->thenCallParent());
//All calls will call the parent by default, you can still stub on an individual
//method basis and you can verify any call
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment