public function testRepository()
 {
     $url = 'http://www.pumukit2.com/liveo1';
     $passwd = 'password';
     $live_type = Live::LIVE_TYPE_FMS;
     $width = 640;
     $height = 480;
     $qualities = 'high';
     $ip_source = '127.0.0.1';
     $source_name = 'localhost';
     $index_play = 1;
     $broadcasting = 1;
     $debug = 1;
     $locale = 'es';
     $name = 'liveo 1';
     $description = 'canal de liveo';
     $liveo = new Live();
     $liveo->setUrl($url);
     $liveo->setPasswd($passwd);
     $liveo->setLiveType($live_type);
     $liveo->setWidth($width);
     $liveo->setHeight($height);
     $liveo->setQualities($qualities);
     $liveo->setIpSource($ip_source);
     $liveo->setSourceName($source_name);
     $liveo->setIndexPlay($index_play);
     $liveo->setBroadcasting($broadcasting);
     $liveo->setDebug($debug);
     $liveo->setLocale($locale);
     $liveo->setName($name, $locale);
     $liveo->setDescription($description, $locale);
     $this->dm->persist($liveo);
     $this->dm->flush();
     $this->assertEquals(1, count($this->repo->findAll()));
 }
 private function createLiveChannel()
 {
     $live = new Live();
     $live->setName('Live channel');
     $live->setUrl('rtmpt://streaming.campusdomar.es:80/live');
     $live->setSourceName('stream');
     $live->setBroadcasting(true);
     $live->setLiveType(Live::LIVE_TYPE_FMS);
     $live->setIpSource('*');
     $this->dm->persist($live);
     $this->dm->flush();
     return $live;
 }
示例#3
0
 public function testIsValidLiveType()
 {
     $live = new Live();
     $live_type = Live::LIVE_TYPE_FMS;
     $live->setLiveType($live_type);
     $this->assertTrue($live->isValidLiveType());
 }