diff --git a/tests/Unit/Managers/ChannelMangerTest.php b/tests/Unit/Managers/ChannelManagerTest.php similarity index 93% rename from tests/Unit/Managers/ChannelMangerTest.php rename to tests/Unit/Managers/ChannelManagerTest.php index 233cfbbe..fa6e5b64 100644 --- a/tests/Unit/Managers/ChannelMangerTest.php +++ b/tests/Unit/Managers/ChannelManagerTest.php @@ -61,17 +61,15 @@ }); it('can get the data for a connection subscribed to a channel', function () { - collect(connections(5))->each(fn ($connection) => $this->channelManager->subscribe( - $this->channel, - $connection, - ['name' => 'Joe'] + collect(connections(5))->each(fn ($connection) => $this->channel->subscribe( + $connection->connection(), + data: json_encode(['name' => 'Joe']) )); - $this->channelManager->connectionKeys($this->channel)->values()->each(function ($data) { - expect($data) - ->toBe(['name' => 'Joe']); + collect($this->channel->connections())->each(function ($connection) { + expect($connection->data())->toBe(['name' => 'Joe']); }); -})->todo(); +}); it('can get all connections for all channels', function () { $connections = connections(12);