Summer Sale! All accounts are 50% off this week.

sardar1592's avatar

Running Laravel Dusk Tests from a specific IP

Hi Artisans, The web app I am testing has two versions. One in English and one in Portuguese. The Portuguese version only shows when the site is accessed from a Brazil IP address. I need to simulate an IP address for all Brazil Dusk tests. What is the best way to go about it, please?

I have tried the following but no luck.

	app()->setLocale('BR');

        $remote = $_SERVER["REMOTE_ADDR"] ?? '191.242.182.132';

        $this->withServerVariables(['REMOTE_ADDR' => $remote]);


0 likes
1 reply

Please or to participate in this conversation.