Support the ongoing development of Laravel.io →
Configuration Testing
Last updated 2 years ago.
0

It seems like the easiest way would be to exclude app/config/testing from your repository and just copy the local settings to it. It's possible to force Laravel to test in a different environment (I've done it), but it's kind of hacky and ended up being more trouble than it was worth.

Last updated 2 years ago.
0

That's pretty much how we're doing it now. I've put in a request though . Would be nice to see the possibility to define multiple test environments or cascade more than one level of config data.

Github issue

Last updated 2 years ago.
0

Unless I misunderstand what you are saying you can already do this in Laravel using Environment configurations.

http://laravel.com/docs/configuration#environment-configuration

Quoting the docs

It is often helpful to have different configuration values based on the environment the application is running in. For example, you may wish to use a different cache driver on your local development machine than on the production server. It is easy to accomplish this using environment based configuration.

Simply create a folder within the config directory that matches your environment name, such as local. Next, create the configuration files you wish to override and specify the options for that environment. F
Last updated 2 years ago.
0

Thank you for the suggestion but the problem lies in the fact that 'testing' is an environment like you would define one 'local'. Therefore it does not cascades your local configuration but the top level one. Laravel lets you define only one testing environment, as 'testing' environment is hard coded in the Laravel source.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.