1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-07 02:24:03 +00:00

Improve BroadcastManager instance checks

This commit is contained in:
lukinovec 2026-04-14 09:26:34 +02:00
parent 20d494f4c6
commit 7af2b8acb4

View file

@ -31,7 +31,9 @@ afterEach(function () {
test('BroadcastingConfigBootstrapper binds TenancyBroadcastManager to BroadcastManager and reverts the binding when tenancy is ended', function() {
config(['tenancy.bootstrappers' => [BroadcastingConfigBootstrapper::class]]);
expect(app(BroadcastManager::class))->toBeInstanceOf(BroadcastManager::class);
expect(app(BroadcastManager::class))
->toBeInstanceOf(BroadcastManager::class)
->not()->toBeInstanceOf(TenancyBroadcastManager::class);
tenancy()->initialize(Tenant::create());
@ -39,7 +41,9 @@ test('BroadcastingConfigBootstrapper binds TenancyBroadcastManager to BroadcastM
tenancy()->end();
expect(app(BroadcastManager::class))->toBeInstanceOf(BroadcastManager::class);
expect(app(BroadcastManager::class))
->toBeInstanceOf(BroadcastManager::class)
->not()->toBeInstanceOf(TenancyBroadcastManager::class);
});
test('BroadcastingConfigBootstrapper maps tenant properties to broadcaster credentials correctly', function(string $driver) {