|
From: todd r. <to...@gm...> - 2008-09-03 13:49:56
|
Noel,
That's exactly what I was looking for! Thank you!
Todd
On Wed, Sep 3, 2008 at 5:40 AM, Noel Darlow <ma...@mc...> wrote:
> 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
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Simpletest-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpletest-support
>
--
----------------------------------------------------------------------
The only "dumb question" is the one you were too afraid to ask.
________________________________________
|