Issue Details (XML | Word | Printable)

Key: ZF-6870
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Benjamin Eberlei
Reporter: Mark
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Zend_Test fails silently when using Zend_Controller_Action_Helper_Redirector::gotoRouteAndExit

Created: 31/May/09 10:10 AM   Updated: 18/Sep/09 01:09 AM   Resolved: 18/Sep/09 01:09 AM
Component/s: Zend_Controller, Zend_Test_PHPUnit
Affects Version/s: None
Fix Version/s: 1.10.0

Time Tracking:
Not Specified


 Description  « Hide

Trying to test a controller action which uses the gotoRouteAndExit function of the redirector helper results in the test exiting silently; you are therefore unable to run any assertions after dispatch.

Not sure if this is a bug at all, or if it is whether it's in PHPUnit or ZF.

Further, I'm not sure of the utility of gotoRouteAndExit over gotoRoute - I probably shouldn't have been using it at all, frankly! It would be nice to have this documented.



Benjamin Eberlei added a comment - 18/Sep/09 01:04 AM

gotoRouteAndExit() does that what it states, it calls exit()!

You can't use that method if you want to test your code.


Benjamin Eberlei added a comment - 18/Sep/09 01:09 AM

This is a documentation issue, i have added a highlighted paragraph into the Zend Test documentation on this issue.