diff --git a/src/Channels/Channel.php b/src/Channels/Channel.php index 0c540470..79dbac96 100644 --- a/src/Channels/Channel.php +++ b/src/Channels/Channel.php @@ -65,15 +65,9 @@ public function subscribed(Connection $connection): bool */ public function broadcast(Application $app, array $payload, Connection $except = null): void { - dump($except ? $except->identifier() : 'No ID'); - dump($this->name()); - dump(count($this->connections())); collect($this->connections()) ->each(function ($connection) use ($payload, $except) { - dump($connection->connection()->identifier()); if ($except && $except->identifier() === $connection->connection()->identifier()) { - dump('Returning early'); - return; } diff --git a/tests/Feature/Reverb/EventsControllerTest.php b/tests/Feature/Reverb/EventsControllerTest.php index 4ffa87b9..94547ded 100644 --- a/tests/Feature/Reverb/EventsControllerTest.php +++ b/tests/Feature/Reverb/EventsControllerTest.php @@ -73,13 +73,14 @@ it('can ignore a subscriber', function () { $connection = $this->connect(); $this->subscribe('test-channel-two', connection: $connection); - $promiseOne = $this->messagePromise($connection); $response = await($this->signedPostRequest('events', [ 'name' => 'NewEvent', 'channels' => ['test-channel-one', 'test-channel-two'], 'data' => ['some' => 'data'], ])); + expect(await($promiseOne))->toBe('{"event":"NewEvent","data":{"some":"data"},"channel":"test-channel-two"}'); + $promiseTwo = $this->messagePromise($connection); $response = await($this->signedPostRequest('events', [ @@ -91,6 +92,5 @@ $this->assertSame(200, $response->getStatusCode()); $this->assertSame('{}', $response->getBody()->getContents()); - expect(await($promiseOne))->toBe('{"event":"NewEvent","data":{"some":"data"},"channel":"test-channel-two"}'); expect(await($promiseTwo))->toBeFalse(); });