If you are using symfony 1.2 or above, and your are trying to make a
functional test, you can use the sfTesterUser class like this:

$browser->
  get('/')->

  with('user')->begin()->
    isCulture('es')->
    isAuthenticated(true)->
    hasCredential('admin')->
    isAttribute('sfguard_user_id', '3')->
    isFlash('notice', '/foo/')->
  end()
;

I only have trouble with the isAttribute() method of this tester, I
can not seem to accomplish this example test, but everything else
works great!

You can learn more about the tester classes on

http://www.symfony-project.org/cookbook/1_2/en/test-application

Cheers, mate!

On May 12, 8:47 am, bedomon <[email protected]> wrote:
> Hi,
>
> Some of my actions need special credential, and I want to make test on
> this feature. I dont's use the sfGuardPlugin in my apps so I don't
> think i can use it for testing.
> If someone can explain how I can do this test.
>
> (I hope you understand my english)
>
> thanks
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://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 [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