Yo Sikk,

Not sure, that's the best practice...

-----------
class myTestBrowser extends sfTestFunctional
{
   public function signin($username, $password)
   {
       return $this->get('/sfGuardAuth/signin')->
         setField('signin[username]', $username)->
         setField('signin[password]', $password)->
         click('sign in')->

       with('response')->begin()->
         isRedirected()->
         followRedirect()->
       end();
   }
}
------------

$b = new myTestBrowser(new sfBrowser());

$b->signin('admin', puc')
->...


See ya...



Le 25 juin 09 à 22:39, sikk a écrit :

>
> hey guys,
>
> I'm currently trying to put in place some functional testing with
> symfony 1.2.*
>
> I can't find the right solution to be able to simulate the user as
> logged in correctly to be used in many test case.
>
> Someone got any strategy already implemented and workin ?
>
> Thanks a lot !
>
> sikk
> >


--~--~---------~--~----~------------~-------~--~----~
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