|
From: Noel D. <ma...@mc...> - 2008-09-03 12:41:13
|
On Tue, 2 Sep 2008 13:41:48 -0700
"todd runstein" <to...@gm...> wrote:
> Any advice on whether this exists in simpletest? If not, is there any
> other way to test my classes exception handling logic?
You can do the following in SimpleTest- no decorator required:
$this->mock->throwOn('methodName', $exception_object);
$this->expectException($this->exception);
If $this->mock->methodName() is called $exception_object will be
thrown.
Noel
|