There's an open bug for this, and it seems a patch was provided to add a
second argument to dispatch() that would allow you to specify if exceptions
should be thrown.

http://framework.zend.com/issues/browse/ZF-5721

But it seems the current workaround would be to pull the exception from the
response object.

--
Hector


On Tue, Apr 6, 2010 at 9:10 AM, Marian Meres <[email protected]> wrote:

> Just an answer to myself: yes, exceptions are not throwing, it is a
> feature.
>
> @see Zend_Test_PHPUnit_ControllerTestCase::dispatch()
>
> m.
>
> On Tue, Apr 6, 2010 at 5:06 PM, Marian Meres <[email protected]>
> wrote:
> > Hello Everyone,
> >
> > I'm playing with the Zend_Test_PHPUnit_ControllerTestCase and have run
> > into a behavior which is somewhat different from what I'm used to with
> > "plain" phpunit testing.
> >
> > This is what I have:
> >
> > class MyControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
> > {
> >    public function testSome()
> >    {
> >        $this->dispatch('/some');
> >        $this->assertModule('some');
> >    }
> > }
> >
> > Now if "/some" throws exception all I see is: Failed asserting last
> > module used <"default"> was "some"
> >
> > I would expect notifying me about the thrown exception right away, as
> > it took me a while to track it down...
> >
> > Is this the expected behavior?
> >
> > Thank you in advance,
> > M.
> >
>

Reply via email to