Mock Laravel's Config facade to return a value only for a certain key Mock Laravel's Config facade to return a value only for a certain key laravel laravel

Mock Laravel's Config facade to return a value only for a certain key


You don't have to mock Config, you can use Config::set() to set any value in Config. So Config::set('specific_key', 'specific_value'); in the test instead of creating the mock should work