This commit is contained in:
Marcel Pociot 2018-11-27 22:18:02 +01:00
parent 755f2fa7d8
commit c9e1448b5d
1 changed files with 8 additions and 5 deletions

View File

@ -44,16 +44,19 @@ class ChannelTest extends TestCase
} }
/** @test */ /** @test */
public function closed_connections_get_removed_from_channel() public function closed_connections_get_removed_from_all_connected_channels()
{ {
$connection = $this->getConnectedWebSocketConnection(['test-channel']); $connection = $this->getConnectedWebSocketConnection(['test-channel-1', 'test-channel-2']);
$channel = $this->getChannel($connection, 'test-channel'); $channel1 = $this->getChannel($connection, 'test-channel-1');
$channel2 = $this->getChannel($connection, 'test-channel-2');
$this->assertTrue($channel->hasConnections()); $this->assertTrue($channel1->hasConnections());
$this->assertTrue($channel2->hasConnections());
$this->pusherServer->onClose($connection); $this->pusherServer->onClose($connection);
$this->assertFalse($channel->hasConnections()); $this->assertFalse($channel1->hasConnections());
$this->assertFalse($channel2->hasConnections());
} }
} }