Skip to content

Instantly share code, notes, and snippets.

@mlively
Created August 14, 2011 22:40
Show Gist options
  • Select an option

  • Save mlively/1145400 to your computer and use it in GitHub Desktop.

Select an option

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