Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement thenThrow() #6

Closed
sebastianheuer opened this issue Oct 7, 2014 · 0 comments
Closed

Implement thenThrow() #6

sebastianheuer opened this issue Oct 7, 2014 · 0 comments
Assignees
Milestone

Comments

@sebastianheuer
Copy link
Owner

Stubs need to be able to throw Exceptions instead of returning a value.

$mock = Mokka::mock(SampleClass::class);
Mokka::when($mock->doFoo())->thenThrow(new \Exception());
@sebastianheuer sebastianheuer added this to the 1.0 milestone Oct 7, 2014
@sebastianheuer sebastianheuer self-assigned this Oct 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant