This is totally off the top of my head

I'm afraid that I can't look into it to verify, as I gotta head out
the door shortly, BUT:

Try to authenticate your user via the website. That is, use the actual
login form, so that you can authenticate in such a way that your
sfBrowser gets a valid session cookie to attach the authentication
state to.

Good luck!



jL


On Dec 24, 2:23 pm, [email protected] wrote:
> Hello,
> I have a hard time retrieving the current user when doing a functional test
>
> Thats my call: $browser = new sfTestFunctional(new sfBrowser());
>
> if I do sth like
> sfContext::getInstance()->getUser()->setAuthenticated(true);
> this works fine, but the next $browser->get() somehow resets the state, if I 
> check the isAuthenticated, it is always false. So I assume that this user is 
> not the user defined by the browser, but how can I retrieve this user?
> the sfBrowser has a getUser(); but I can never retrieve it because PHP says 
> that I do a call on a non object:
>
> $b = new sfBrowser();
> $browser = new sfTestFunctional($b);
>
> $b->getUser();
>
> Please help and merry x-mas
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to