/**
  * @param ConnectionInterface $from
  * @param \stdClass $package
  */
 public function run(ConnectionInterface $from, \stdClass $package)
 {
     $from->send(json_encode(['command' => $this->getName(), 'channels' => $this->channels->getChannelNames()]));
 }
 public function testGetChannelNames()
 {
     $chn = new Channel('one');
     $this->channels->add($chn);
     $this->assertEquals(['one'], $this->channels->getChannelNames());
 }