From ca400b51d2701cf9061084f102c581c2f81e077c Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 13 Dec 2023 19:11:18 +0100 Subject: [PATCH] Fix global/central channel terminology --- src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php | 4 ++-- tests/BootstrapperTest.php | 2 +- tests/BroadcastingTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php b/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php index 8c916d28..12923fb7 100644 --- a/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php +++ b/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php @@ -101,7 +101,7 @@ class BroadcastChannelPrefixBootstrapper implements TenancyBootstrapper } } - // Give the tenant prefix to channels that aren't flagged as central + // Give the tenant prefix to channels that aren't flagged as global if (! str($channel)->startsWith('global__')) { $channel = str($channel)->after($defaultPrefix)->prepend($defaultPrefix . tenant()->getTenantKey() . '.'); } @@ -143,7 +143,7 @@ class BroadcastChannelPrefixBootstrapper implements TenancyBootstrapper } } - // Give the tenant prefix to channels that aren't flagged as central + // Give the tenant prefix to channels that aren't flagged as global if (! str($channel)->startsWith('global__')) { $channel = str($channel)->after($defaultPrefix)->prepend($defaultPrefix . tenant()->getTenantKey() . '.'); } diff --git a/tests/BootstrapperTest.php b/tests/BootstrapperTest.php index d6a8e29b..ba87e717 100644 --- a/tests/BootstrapperTest.php +++ b/tests/BootstrapperTest.php @@ -804,7 +804,7 @@ test('BroadcastChannelPrefixBootstrapper prefixes the channels events are broadc } } - // Skip prefixing channels flagged with the central channel prefix + // Skip prefixing channels flagged with the global channel prefix if (! str($channel)->startsWith('global__')) { $channel = str($channel)->after($defaultPrefix)->prepend($defaultPrefix . tenant()->getTenantKey() . '.'); } diff --git a/tests/BroadcastingTest.php b/tests/BroadcastingTest.php index 115f7e9f..a9321928 100644 --- a/tests/BroadcastingTest.php +++ b/tests/BroadcastingTest.php @@ -178,7 +178,7 @@ test('broadcasting channel helpers register channels correctly', function() { expect($getChannels())->toBeEmpty(); - // Central channel prefixes the channel name with 'global__' + // Global channel helper prefixes the channel name with 'global__' global_channel($channelName, $channelClosure); // Channel prefixed with 'global__' found