squibby
668
9
Testing

How to change env variable / config in Dusk test?

Posted 11 months ago by squibby

I have a .env variable link to a Laravel config file which toggles certain section in my site. In Dusk testing I want to test that certain functionality is shown / hidden depending on this state.

How to set the config / or update dusk .env variable on each test?

I have tried Config::set() but it doesn't seem to work. Has anyone else done this before?

Thanks.

Please sign in or create an account to participate in this conversation.