How to override env variables in Laravel Dusk

后端 未结 3 812
谎友^
谎友^ 2020-12-11 14:37

Unfortunately config([\'key\' => \'newValue\']) doesn\'t work in a Dusk setup (for overriding a config value), presumably because it would change the config

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 15:00

    You can also use a seperate env for all the dusk tests. It is also mentioned in the laravel docs here https://laravel.com/docs/8.x/dusk#environment-handling

提交回复
热议问题