/**
  * Get the output parameters for streaming.
  *
  * @return string
  * @throws LiveBroadcastOutputException
  */
 public function generateOutputCmd()
 {
     if (!$this->channel instanceof ChannelTwitch || empty($this->channel->getStreamKey()) || empty($this->channel->getStreamServer())) {
         throw new LiveBroadcastOutputException(__FUNCTION__ . ' Twitch channel not configured');
     }
     return sprintf('-vcodec copy -acodec copy -f flv "rtmp://%s/app/%s"', $this->channel->getStreamServer(), $this->channel->getStreamKey());
 }
 public function testGetMethods()
 {
     $channel = new ChannelTwitch();
     self::assertEquals('live.twitch.tv', $channel->getStreamServer());
     $channel->setChannelName('UnitTest')->setStreamKey('key')->setStreamServer('server');
     self::assertEquals('UnitTest', $channel->getChannelName());
     self::assertEquals('key', $channel->getStreamKey());
     self::assertEquals('server', $channel->getStreamServer());
 }