Hi,

Thanks for your replies.

I am already using the redirector plugin, goToSimple which is the same as 
direct().

Example for this particular issue:

$redirector = 
Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
return $redirector->gotoSimple('index', 'login', 'public');

I am also aware of the exit problem but in this case the script is not dying, 
Location headers are correctly being returned but for some reason the 
frontcontroller is not identifying the request as a redirect ( it has 302 code 
).

Any ideas of what might be happening?

Regards,

Fernando Morgenstern
[email protected]



Em 27/02/2011, às 07:13, Wil Moore III escreveu:

> 
> Fernando wrote:
>> 
>> Why would isRedirect() return false if, based on headers, it's clearly a
>> redirect?
>> 
> 
> From the manual: http://framework.zend.com/manual/en/zend.test.phpunit.html
> Due to its nature the redirector action helper plugin issues a redirect and
> exists after this. Because you cannot test parts of an application that
> issue exit calls Zend_Test_PHPUnit_ControllerTestCase automatically disables
> the exit part of the redirector which can cause different behaviours in
> tests and the real application. To make sure redirect work correctly you
> should it them in the following way:
> 
> return $this->_redirect(...);
> 
> -----
> --
> Wil Moore III
> 
> Why is Bottom-posting better than Top-posting:
> http://www.caliburn.nl/topposting.html
> 
> DO NOT TOP-POST and DO trim your replies:
> http://linux.sgms-centre.com/misc/netiquette.php#toppost
> -- 
> View this message in context: 
> http://zend-framework-community.634137.n4.nabble.com/Zend-Test-failing-on-AssertRedirectTo-tp3325845p3326684.html
> Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to