You are talking about functional tests, but the original post was about unit tests.
Regards, Christopher. > -----Ursprüngliche Nachricht----- > Von: symfony-users@googlegroups.com [mailto:symfony- > us...@googlegroups.com] Im Auftrag von Massimiliano Arione > Gesendet: Donnerstag, 19. August 2010 16:06 > An: symfony users > Betreff: [symfony-users] Re: IS there any manual to correct unit test > system for integrating with sfGuard auth symfony? > > On 19 Ago, 05:14, Maxim Oleinik <maxim.olei...@gmail.com> wrote: > > protected function authenticateUser(sfGuardUser $user) > > { > > // Init session > > $context = $this->browser->getContext(true); > > > > $context->getUser()->signIn($user); > > $context->getUser()->shutdown(); > > $context->getStorage()->shutdown(); > > > > } > > Ugly! > > try this one: > > public function login($username = 'foo', $password = 'bar') > { > return $this->click('sign in', array('signin' => array( > 'username' => $username, > 'password' => $password, > )))->with('response')->isRedirected()->followRedirect(); > } > > of course, replace 'foo' and 'bar' with your preferred default > credentials > > cheers > Massimiliano > > -- > If you want to report a vulnerability issue on symfony, please send it > to security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en