Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: withServerVariables doesn't impose any changes to a request #1253

Open
Brand3000 opened this issue Sep 15, 2024 · 0 comments
Open

[Bug]: withServerVariables doesn't impose any changes to a request #1253

Brand3000 opened this issue Sep 15, 2024 · 0 comments
Labels

Comments

@Brand3000
Copy link

What Happened

When I chain the withServerVariables() function to the request in a test, it doesn't set my variable.
Though It works fine in the PHPUnit test

How to Reproduce

$response = $this->withServerVariables(['REMOTE_ADDR' => '127.0.0.1'])->get('/');

and in the web.php route file:

Route::get('/', function () {
    Log::info($_SERVER);
});

By checking the log file I can't find the REMOTE_ADDR variable at all

Sample Repository

No response

Pest Version

3

PHP Version

8.2

Operation System

macOS

Notes

No response

@Brand3000 Brand3000 added the bug label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant