mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 07:33:58 -06:00
Make sure local config is not loaded in tests
This commit is contained in:
parent
b17c576a30
commit
a3b2f94339
@ -18,7 +18,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"akrabat/ip-address-middleware": "^2.1",
|
"akrabat/ip-address-middleware": "^2.1",
|
||||||
"cakephp/chronos": "^2.3",
|
"cakephp/chronos": "~2.3.3",
|
||||||
"doctrine/migrations": "^3.5",
|
"doctrine/migrations": "^3.5",
|
||||||
"doctrine/orm": "^2.14",
|
"doctrine/orm": "^2.14",
|
||||||
"endroid/qr-code": "^4.7",
|
"endroid/qr-code": "^4.7",
|
||||||
|
@ -42,10 +42,9 @@ return (new ConfigAggregator\ConfigAggregator([
|
|||||||
Core\ConfigProvider::class,
|
Core\ConfigProvider::class,
|
||||||
CLI\ConfigProvider::class,
|
CLI\ConfigProvider::class,
|
||||||
Rest\ConfigProvider::class,
|
Rest\ConfigProvider::class,
|
||||||
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
|
new ConfigAggregator\PhpFileProvider('config/autoload/{,*.}global.php'),
|
||||||
$isTestEnv
|
// Local config should not be loaded during tests, whereas test config should be loaded ONLY during tests
|
||||||
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
|
new ConfigAggregator\PhpFileProvider($isTestEnv ? 'config/test/*.global.php' : 'config/autoload/{,*.}local.php'),
|
||||||
: new ConfigAggregator\ArrayProvider([]),
|
|
||||||
// Routes have to be loaded last
|
// Routes have to be loaded last
|
||||||
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
|
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
|
||||||
], 'data/cache/app_config.php', [
|
], 'data/cache/app_config.php', [
|
||||||
|
Loading…
Reference in New Issue
Block a user