|
From: todd r. <to...@gm...> - 2008-09-02 20:41:48
|
I'm looking for a way to make my mock object throw an exception. I want to
test that my class under test catches and handles any thrown exceptions
correctly. I want to add a call to my mock object similar to:
$this->mymock->setReturnValue('doomedmethod', new Exception('thanks'));
Or even better:
$this->mymock->expectAndThrow('doomedmethod', new Exception('thanks'));
Any advice on whether this exists in simpletest? If not, is there any other
way to test my classes exception handling logic?
Thanks,
Todd
--
----------------------------------------------------------------------
The only "dumb question" is the one you were too afraid to ask.
________________________________________
|