From 12e51d0378e395b68aa8738104b4eedbd787d392 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Sun, 12 Jul 2026 12:28:01 +0200 Subject: [PATCH] Test that when a tenant doesn't have the property that should be mapped to config, the central config values are kept --- tests/Bootstrappers/BroadcastingConfigBootstrapperTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Bootstrappers/BroadcastingConfigBootstrapperTest.php b/tests/Bootstrappers/BroadcastingConfigBootstrapperTest.php index 8c6e1beb..1ea35d66 100644 --- a/tests/Bootstrappers/BroadcastingConfigBootstrapperTest.php +++ b/tests/Bootstrappers/BroadcastingConfigBootstrapperTest.php @@ -152,6 +152,13 @@ test('BroadcastingConfigBootstrapper maps tenant properties to broadcaster crede expect(app(BroadcasterContract::class)->config['key'])->toBe('tenant1_key'); expect(Broadcast::driver()->config['key'])->toBe('tenant1_key'); + // Initializing tenancy for a tenant without the mapped property keeps the central config value + tenancy()->initialize(Tenant::create()); + + expect(config("broadcasting.connections.{$driver}.key"))->toBe('central_key'); + expect(app(BroadcastManager::class)->driver()->config['key'])->toBe('central_key'); + expect(app(BroadcasterContract::class)->config['key'])->toBe('central_key'); + tenancy()->end(); expect(config("broadcasting.connections.{$driver}.key"))->toBe('central_key');