Skip to content

Commit e52d8ba

Browse files
committed
Save cache in a separate file when running tests
1 parent e547948 commit e52d8ba

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<env name="LOG_AUTH_EVENTS" value="false" />
4040
<env name="BROADCAST_DRIVER" value="log"/>
4141
<env name="SAVED_SEARCH_COUNT" value="false"/>
42+
<env name="APP_CONFIG_CACHE" value="bootstrap/cache/config.test.php"/>
4243

4344
<!-- Caching config -->
4445
<env name="CACHE_DRIVER" value="array" />
@@ -52,7 +53,6 @@
5253
<env name="DATA_DB_TIMEZONE" value="+00:00" />
5354

5455
<!-- Log config -->
55-
<env name="LOG_CHANNEL" value="test" />
5656

5757
<!-- MS Sql server -->
5858
<env name="RUN_MSSQL_TESTS" value="false" />

tests/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// Bootstrap laravel
1414
app()->make(Kernel::class)->bootstrap();
1515

16-
// Clear cache so we don't overwrite our local development database
17-
Artisan::call('config:clear', ['--env' => 'testing']);
16+
// Cache with new config so we don't overwrite our local development database
17+
Artisan::call('config:cache', ['--env' => 'testing']);
1818

1919
//Ensure storage directory is linked
2020
Artisan::call('storage:link', []);

0 commit comments

Comments
 (0)