On 22.12.2010, at 20:37, Gustavo Adrian wrote:

> 
> $client->request( 'POST', 'myURL', array(), array(), array(
>       'PHP_AUTH_USER'         => 'admin',
>       'PHP_AUTH_PW'           => '1234'
> ) );
> 
> But it doesn't work. Am I missing something else?

hmm that looks pretty good to me. though i usually set the parameters when 
creating the client so that its automatically set in every request. also i am 
authenticating with an entity:

$params = array('PHP_AUTH_USER' => $authentication['username'], 'PHP_AUTH_PW' 
=> $authentication['password']);
$client = $this->createClient(array('environment' => 'test'), $params);

I have created a Bundle with some helpers for functional tests:
https://github.com/liip/FunctionalTestBundle

It also has an example for how to load fixtures and how to do a test for a 
command.

regards,
Lukas Kahwe Smith
[email protected]



-- 
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 developers" 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-devs?hl=en

Reply via email to