1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 16:34:04 +00:00

Check for the the testing env in DB bootstrapper

This commit is contained in:
lukinovec 2022-10-03 13:59:54 +02:00
parent f46e7b2858
commit 343de54b40

View file

@ -25,7 +25,7 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
/** @var TenantWithDatabase $tenant */
// Better debugging, but breaks cached lookup in prod
if (app()->environment('local')) {
if (app()->environment('local') || app()->environment('testing')) {
$database = $tenant->database()->getName();
if (! $tenant->database()->manager()->databaseExists($database)) {
throw new TenantDatabaseDoesNotExistException($database);