Symfony functional test – custom headers not passing through

I have the same issue and after a little dig through I think it is a feature that BrowserKit currently doesn’t support.

I have logged an issue for it:
https://github.com/symfony/symfony/issues/5074

Update: this is not an issue — see the comments below

Sample Code

Sample request:

$client->request(
    'GET',
    $url,
    array(),
    array(),
    array(
        'HTTP_X_CUSTOM_VAR' => $var
    )
);

Fetching the data:

$request->headers->get('x-custom-var');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)