From bae042dc62151e607252ab93d624252e55bc4b11 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Mon, 20 Nov 2023 16:29:15 +0000 Subject: [PATCH] fix presence test --- ...hannelMangerTest.php => ChannelManagerTest.php} | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename tests/Unit/Managers/{ChannelMangerTest.php => ChannelManagerTest.php} (93%) 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);