public function testSendsToConnectionsInChannel()
 {
     $chn = new Channel('my-channel');
     $chn->addConnection($this->connection);
     $this->channels->add($chn);
     $package = (object) ['from' => 'Helmut', 'channel' => 'my-channel', 'message' => 'Hello World'];
     $this->command->run($this->connection, $package);
     $res = json_decode($this->packages[0]);
     $this->assertEquals('Hello World', $res->message);
 }
 public function testRemoveConnection()
 {
     $this->channel->addConnection($this->connection);
     $this->channel->removeConnection($this->connection);
     $this->assertEmpty($this->channel->getConnections());
 }