Hi Hector,

Thanks for your reply. Unfortunately i was only able to test this now..

If i set request as dispatched in my controller plugin:

$request->setDispatched(true);

The result is the same. With Zend Test, controller code is executed normally.

Do you have any ideas of how to fix this? I think i will open a bug report with 
a sample code.

Regards,

Fernando Morgenstern

Em 06/12/2010, às 22:34, Hector Virgen escreveu:

> If you tell the request that it has already been dispatched, it will skip
> dispatching the action controller. There are certain times (like when
> redirecting) that you'll want to skip dispatching.
> 
> --
> *Hector Virgen*
> Sr. Web Developer
> http://www.virgentech.com
> 
> 
> 
> On Mon, Dec 6, 2010 at 4:32 PM, Fernando Marcelo <
> cont...@fernandomarcelo.com> wrote:
> 
>> Hi,
>> 
>> I'm using it in preDispatch hook.
>> 
>>> Did you try calling $request->isDispatched(true)?
>> 
>> Sorry, but i don't see a relation between this code and my problem. Could
>> you please explain?
>> 
>> Regards,
>> 
>> Fernando Morgenstern
>> cont...@fernandomarcelo.com
>> 
>> 
>> 
>> 
>> Em 06/12/2010, às 22:27, Hector Virgen escreveu:
>> 
>>> I didn't realize this was from within a plugin. Which hook are you in?
>> Did you try calling $request->isDispatched(true)?
>>> 
>>> --
>>> Hector Virgen
>>> Sr. Web Developer
>>> http://www.virgentech.com
>>> 
>>> 
>>> 
>>> On Mon, Dec 6, 2010 at 4:18 PM, Fernando Marcelo <
>> cont...@fernandomarcelo.com> wrote:
>>> Thanks for the reply but i also tried this in the past and i get the same
>> result: controller code is still executed and redirect is ignored.
>>> 
>>> Any other ideas?
>>> 
>>> Regards,
>>> 
>>> Fernando Morgenstern
>>> cont...@fernandomarcelo.com
>>> 
>>> 
>>> 
>>> 
>>> Em 06/12/2010, às 22:14, Hector Virgen escreveu:
>>> 
>>>> You need to return the redirector for unit tests:
>>>> 
>>>> return $redirector->gotoSimple(/*...*/);
>>>> 
>>>> --
>>>> Hector Virgen
>>>> Sr. Web Developer
>>>> http://www.virgentech.com
>>>> 
>>>> 
>>>> 
>>>> On Mon, Dec 6, 2010 at 3:00 PM, Fernando Morgenstern <
>> cont...@fernandomarcelo.com> wrote:
>>>> Hi,
>>>> 
>>>> I'm having some issues with Zend Test and controller plugins.
>>>> 
>>>> The issue is specifically with an Auth plugin that i have. If i have
>> this code:
>>>> 
>>>> $redirector =
>> Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
>>>> $redirector->gotoSimple('index', 'login', 'public');
>>>> return;
>>>> 
>>>> It's ignored by Zend Test and it executes the code in controllers
>> without applying the redirect.
>>>> 
>>>> If i use the same redirect code in controllers, it works ok.
>>>> 
>>>> Is this a bug in Zend Test? Any way to fix this issue?
>>>> 
>>>> Regards,
>>>> 
>>>> Fernando Morgenstern
>>>> cont...@fernandomarcelo.com
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 

Reply via email to