/**
  * Test if the correct output instance is returned for a given channel
  */
 public function testGetOutputInterface()
 {
     $outputFacebook = new OutputFacebook();
     $outputTwitch = new OutputTwitch();
     $channelTwitch = new ChannelTwitch();
     $channelTwitch->setStreamKey('key');
     $channelTwitch->setStreamServer('server');
     $service = new StreamOutputService();
     $service->addStreamOutput($outputFacebook, 'Facebook');
     $service->addStreamOutput($outputTwitch, 'Twitch');
     $twitch = $service->getOutputInterface($channelTwitch);
     self::assertEquals('-vcodec copy -acodec copy -f flv "rtmp://server/app/key"', $twitch->generateOutputCmd());
 }
 /**
  * Setup a testable Twitch channel.
  */
 public function setUp()
 {
     $this->twitchChannel = new ChannelTwitch();
     $this->twitchChannel->setStreamServer('value1');
     $this->twitchChannel->setStreamKey('value2');
 }