Hi,
I have searched for this topic in the mail group because I have found a similar
ticket to that problem here:
http://trac.symfony-project.org/ticket/5459 but no mail in the group.
We'are used to use tests before development and as the author of the ticket
above pointed out, followRedirect seems not to work when it comes to redirects
via redirect and not forward (so a meta redirection occurs)
Two actions that looks like:
public function executeSummary($request)
{
$this->redirect('samemodule/listing');
}
public function executeListing($request)
{
// display a form
$form = new MyForm()
}
A testing case looks sth like that: Visit Summary, check that there is a
redirection, follow it and then test the form to which it is redirected.
So:
$browser->
get('somemodule/summary')->
with('response')->begin()->
isRedirected()->
followRedirect()->
end()->
with('request')->
isParameter('action','listing')->
doFormTesting()
At this moment I should be redirected to listing action, and I am but the
browser itself is not. I cant move to the new form and use it, because the
state in which the browser is, is indeed the meta redirection code mentioned in
the ticket and I am never able to do the "doFormTesting()"
HTTP/1.X 302
Location: http://localhost/index.php/somemodule
<html><head><meta http-equiv="refresh" content="0;url=http://localhost/index.php
/somemodule"/></head></html>
One solution would be to do a manual get to this action and test the module
than but this implies some problems, the redirection occurs in some cases where
the inner state of the project is evaluated so it is important for us to be
able to follow the redirect not matter where it goes.
Thank you in advance :)
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---