From f5f5f1d4aae35c7670548371628306f7f8777499 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 1 May 2026 11:52:56 +0200 Subject: [PATCH] Fix DB bootstrapper test "database tenancy bootstrapper throws an exception if DATABASE_URL is set" was failing with the null $databaseUrl because the tenant DB was never created. This test was ignored during test runs because the test file lacked the 'Test' suffix. --- tests/Bootstrappers/DatabaseTenancyBootstrapperTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Bootstrappers/DatabaseTenancyBootstrapperTest.php b/tests/Bootstrappers/DatabaseTenancyBootstrapperTest.php index ec480135..95c815c9 100644 --- a/tests/Bootstrappers/DatabaseTenancyBootstrapperTest.php +++ b/tests/Bootstrappers/DatabaseTenancyBootstrapperTest.php @@ -82,6 +82,10 @@ test('database tenancy bootstrapper throws an exception if DATABASE_URL is set', config(['tenancy.bootstrappers' => [DatabaseTenancyBootstrapper::class]]); + Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) { + return $event->tenant; + })->toListener()); + $tenant1 = Tenant::create(); pest()->artisan('tenants:migrate');