Esempio n. 1
0
 public function testOgg()
 {
     $info = Embed\Embed::create('https://upload.wikimedia.org/wikipedia/commons/b/b5/I-15bis.ogg');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->code, '<video controls><source src="https://upload.wikimedia.org/wikipedia/commons/b/b5/I-15bis.ogg"></video>');
     $this->assertEquals($info->providerUrl, 'https://wikimedia.org');
 }
Esempio n. 2
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://video.mit.edu/watch/2014-friday-after-thanksgiving-chain-reaction-29337/');
     $this->assertEquals($info->title, '2014 Friday After Thanksgiving Chain Reaction | MIT Video');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->providerName, 'MIT Media Lab');
 }
Esempio n. 3
0
 public function testOne()
 {
     $info = Embed\Embed::create('https://shoudio.com/collection/1235/wendelbosroute.html');
     $this->assertEquals($info->title, "Wendelbosroute");
     $this->assertEquals($info->type, 'link');
     $this->assertEquals($info->providerName, 'Shoudio, the location based audio platform');
 }
Esempio n. 4
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://jsfiddle.net/zhm5rjnz/');
     $this->assertEquals($info->title, 'Edit fiddle - JSFiddle');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'jsfiddle');
 }
Esempio n. 5
0
 public function testMap()
 {
     $info = Embed\Embed::create('https://www.google.es/maps/place/Tordoia,+A+Coru%C3%B1a/@43.0871207,-8.5710004,12z/data=!3m1!4b1!4m2!3m1!1s0xd2ef4006f1ef489:0x404f58273ca55a0');
     $this->assertEquals($info->title, 'Google Maps');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'Google Maps');
 }
Esempio n. 6
0
 public function testOne()
 {
     $info = Embed\Embed::create('https://archive.org/details/dn2015-0220_vid');
     $this->assertEquals($info->width, 640);
     $this->assertEquals($info->height, 480);
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->providerName, 'Internet Archive');
 }
Esempio n. 7
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://pastebin.com/d4biUtRm');
     $this->assertEquals($info->title, '[Bash] Pushing new git submodule to Heroku - Pastebin.com');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'Pastebin');
     $this->assertEquals($info->providerUrl, 'http://pastebin.com');
 }
Esempio n. 8
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.rdio.com/artist/Various_Artists/album/50_Dance_Hits_2015/');
     $this->assertEquals($info->title, '50 Dance Hits 2015');
     $this->assertEquals($info->imageWidth, 400);
     $this->assertEquals($info->imageHeight, 400);
     $this->assertEquals($info->type, 'rich');
 }
Esempio n. 9
0
 public function test3d()
 {
     $info = Embed\Embed::create('https://github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl');
     $this->assertEquals($info->title, 'skalnik/secret-bear-clip');
     $this->assertEquals($info->code, '<script src="https://embed.githubusercontent.com/view/3d/skalnik/secret-bear-clip/master/stl/clip.stl"></script>');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'GitHub');
 }
Esempio n. 10
0
 public function testDrive()
 {
     $info = Embed\Embed::create('https://drive.google.com/file/d/0B2rwN8wAbVSWbmFJdUdnV2VSTTg/view');
     $this->assertEquals($info->title, 'Entrevista_Rianxo_RadioFusion_150724.mp3');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->code, '<iframe src="https://drive.google.com/file/d/0B2rwN8wAbVSWbmFJdUdnV2VSTTg/preview?pli=1&amp;usp=embed_facebook" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:600px;height:400px;"></iframe>');
     $this->assertEquals($info->providerName, 'Google Docs');
 }
 public function setFromURL($url)
 {
     if ($url) {
         $info = Embed\Embed::create($url);
         // , array('image' => array('minImageWidth' => $this->Width, 'minImageHeight' => $this->Height)));
         $this->setFromEmbed($info);
     }
 }
Esempio n. 12
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.howcast.com/videos/512882-How-to-Make-an-Alabama-Slammer-Shots-Recipes');
     $this->assertEquals($info->title, 'How to Make an Alabama Slammer | Howcast');
     $this->assertEquals($info->image, 'http://98441.cdx.c.ooyala.com/8zcDVjczr8uRcjUmcmfImbxKI6OP6cFf/promo251669269');
     $this->assertEquals($info->code, '<script height="422px" width="750px" src="http://player.ooyala.com/iframe.js#ec=8zcDVjczr8uRcjUmcmfImbxKI6OP6cFf&pbid=5d8891bc445c4156a75933fbf4bcfc9a"></script>');
     $this->assertEquals($info->type, 'rich');
 }
Esempio n. 13
0
 public function testProfile()
 {
     $info = Embed\Embed::create('https://www.flickr.com/photos/desescribir');
     $this->assertEquals($info->imageWidth, 2048);
     $this->assertEquals($info->imageHeight, 1454);
     $this->assertEquals($info->code, '<iframe src="https://www.flickr.com/photos/desescribir/player" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:640px;height:425px;"></iframe>');
     $this->assertEquals($info->type, 'rich');
 }
Esempio n. 14
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.meetup.com/SetPay-Talks/events/219650150/');
     $this->assertEquals($info->title, 'Docker, from zero to hero with Carlos Sánchez');
     $this->assertEquals($info->description, "Inauguramos las charlas de SetPay con uno de los temas más de moda en 2014, Docker.\n\n Docker es una herramienta para que desarrolladores y administradores de sistemas construyan, desplieguen y ejecute");
     $this->assertEquals($info->imageWidth, 567);
     $this->assertEquals($info->imageHeight, 392);
     $this->assertEquals($info->type, 'rich');
 }
Esempio n. 15
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.spreaker.com/show/deseos-del-alma-poemas_1');
     $this->assertEquals($info->title, 'Te nombro - Poemas');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->code, '<iframe src="https://www.spreaker.com/embed/player/standard?autoplay=false&amp;episode_id=4535030" frameborder="0" allowTransparency="true" style="min-width:400px;border:none;overflow:hidden;width:100%;height:131px;"></iframe>');
     $this->assertEquals($info->providerName, 'Spreaker');
     $this->assertEquals($info->providerUrl, 'https://spreaker.com');
 }
Esempio n. 16
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://polldaddy.com/poll/7012505/');
     $this->assertEquals($info->title, "Which design do you prefer?");
     $this->assertEquals($info->description, 'Poll Answers: Option #1, Option #2,');
     $this->assertEquals($info->code, '<script type="text/javascript" charset="utf-8" src="https://secure.polldaddy.com/p/7012505.js"></script><noscript><a href="https://polldaddy.com/poll/7012505/">Which design do you prefer?</a></noscript>');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'Polldaddy');
 }
Esempio n. 17
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://open.spotify.com/track/7nDQMtLxu94xtlTR8bEqjU');
     $this->assertEquals($info->title, 'Faded');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->code, '<iframe src="https://embed.spotify.com/?uri=spotify:track:7nDQMtLxu94xtlTR8bEqjU" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:300px;height:380px;"></iframe>');
     $this->assertEquals($info->providerName, 'Spotify');
     $this->assertEquals($info->providerUrl, 'https://spotify.com');
 }
Esempio n. 18
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.viddler.com/v/bdce8c7');
     $this->assertEquals($info->title, 'Viddler Platform Overview');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->code, '<iframe width="620" height="349" src="http://viddler.com/embed/bdce8c7" frameborder="0" allowfullscreen></iframe>');
     $this->assertEquals($info->providerName, 'Viddler');
     $this->assertEquals($info->providerUrl, 'http://viddler.com/');
 }
Esempio n. 19
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://a.yfrog.com/img593/8436/snso.jpg');
     $this->assertEquals($info->title, 'http://a.yfrog.com/img593/8436/snso.jpg');
     $this->assertEquals($info->imageWidth, 4928);
     $this->assertEquals($info->imageHeight, 3264);
     $this->assertEquals($info->type, 'photo');
     $this->assertEquals($info->providerName, 'yFrog');
 }
Esempio n. 20
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://chirb.it/7A9L9B');
     $this->assertEquals($info->title, 'Chirbit [nvanderklippe] Encana conference call');
     $this->assertEquals($info->width, 398);
     $this->assertEquals($info->height, 120);
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'Chirbit');
 }
Esempio n. 21
0
 public function testOne()
 {
     $info = Embed\Embed::create('https://gist.github.com/oscarotero/7749998');
     $this->assertEquals($info->title, 'oscarotero/Git-cheatsheet.sh');
     $this->assertEquals($info->imageWidth, 140);
     $this->assertEquals($info->imageHeight, 140);
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->providerName, 'Gist');
 }
Esempio n. 22
0
 public function testNormal()
 {
     $info = Embed\Embed::create('http://codepen.io/Zhouzi/pen/JoRazP');
     $this->assertEquals($info->title, 'TheaterJS');
     $this->assertEquals($info->imageWidth, 384);
     $this->assertEquals($info->imageHeight, 225);
     $this->assertEquals($info->code, '<iframe id="cp_embed_JoRazP" src="https://codepen.io/Zhouzi/embed/JoRazP?height=300&amp;slug-hash=JoRazP&amp;default-tab=result&amp;host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>');
     $this->assertEquals($info->type, 'rich');
 }
Esempio n. 23
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://media.photobucket.com/user/Ignwar/media/Album%20Deserts/MoonriseMonumentValleyUtah.jpg.html?filters[term]=sunsets&filters[primary]=images');
     $this->assertEquals($info->title, 'Deserts');
     $this->assertEquals($info->description, "I P uploaded this image to 'Album Deserts'.  See the album on Photobucket.");
     $this->assertEquals($info->imageWidth, 1600);
     $this->assertEquals($info->imageHeight, 1200);
     $this->assertEquals($info->type, 'photo');
 }
Esempio n. 24
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://open.spotify.com/track/7nDQMtLxu94xtlTR8bEqjU');
     $this->assertEquals($info->title, 'Zhu - Faded');
     $this->assertEquals($info->type, 'rich');
     $this->assertEquals($info->code, '<iframe src="https://embed.spotify.com/?uri=spotify:track:7nDQMtLxu94xtlTR8bEqjU" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>');
     $this->assertEquals($info->providerName, 'Spotify');
     $this->assertEquals($info->providerUrl, 'https://www.spotify.com');
 }
Esempio n. 25
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://i.imgur.com/X6rkCc5.jpg');
     $this->assertEquals($info->title, 'http://i.imgur.com/X6rkCc5.jpg');
     $this->assertEquals($info->imageWidth, 2000);
     $this->assertEquals($info->imageHeight, 1332);
     $this->assertEquals($info->type, 'photo');
     $this->assertEquals($info->providerName, 'Imgur');
 }
Esempio n. 26
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.kewego.es/video/iLyROoaf2vuS.html');
     $this->assertEquals($info->title, 'Una gaviota traviesa roba una cámara mientras graba');
     $this->assertEquals($info->description, 'Divertido vídeo en el que una gaviota se hace con una cámara mientras está grabando.');
     $this->assertEquals($info->code, '<object  id="iLyROoaf2vuS"  type="application/x-shockwave-flash"  data="http://sa.kewego.com/swf/p3/epix.swf"  width="400"  height="300"> <param name="flashVars" value="language_code=es&playerKey=5e3d22b8b739&skinKey=&sig=iLyROoaf2vuS&autostart=false&advertise=1" /> <param name="movie" value="http://sa.kewego.com/swf/p3/epix.swf" /> <param name="allowFullScreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="wmode" value="Opaque" /><video poster="" height="300" width="400" preload="none"  controls="controls"></video><script src="http://sa.kewego.com/embed/assets/kplayer-standalone.js"></script><script defer="defer">kitd.html5loader("flash_epix_iLyROoaf2vuS","http://api.kewego.com/video/getHTML5Thumbnail/?playerKey=5e3d22b8b739&sig=iLyROoaf2vuS");</script></object>');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->authorName, 'zoomines');
     $this->assertEquals($info->providerName, 'kewego');
 }
Esempio n. 27
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://giphy.com/gifs/puppies-cute-animals-asdfghjkl-6UZFwMYqCeXi8');
     $this->assertEquals($info->title, 'Puppies Animated GIF');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->providerName, 'Giphy');
     $this->assertEquals($info->code, '<iframe src="https://giphy.com/embed/6UZFwMYqCeXi8?html5=true" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:500px;height:280px;"></iframe>');
     $this->assertEquals($info->width, 500);
     $this->assertEquals($info->height, 280);
 }
Esempio n. 28
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://www.collegehumor.com/video/6974337/gluten-free-duck');
     $this->assertEquals($info->title, 'Gluten Free Duck');
     $this->assertEquals($info->width, 610);
     $this->assertEquals($info->height, 343);
     $this->assertEquals($info->code, '<iframe src="http://www.collegehumor.com/e/6974337" width="610" height="343" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>');
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->providerName, 'CollegeHumor');
 }
Esempio n. 29
0
 public function testOne()
 {
     $info = Embed\Embed::create('https://animoto.com/play/JzwsBn5FRVxS0qoqcBP5zA');
     $this->assertEquals($info->title, 'Juno Groove');
     $this->assertEquals($info->width, 640);
     $this->assertEquals($info->height, 360);
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->authorName, 'Chris Korhonen');
     $this->assertEquals($info->providerName, 'Animoto');
 }
Esempio n. 30
0
 public function testOne()
 {
     $info = Embed\Embed::create('http://blip.tv/nostalgiacritic/nc-the-matrix-7139747');
     $this->assertEquals($info->title, 'NC: The Matrix');
     $this->assertEquals($info->imageWidth, 620);
     $this->assertEquals($info->imageHeight, 274);
     $this->assertEquals($info->type, 'video');
     $this->assertEquals($info->providerName, 'Blip');
     $this->assertEquals($info->code, '<iframe src="http://blip.tv/play/gbk7g7PkBwI.x?p=1" width="480" height="392" frameborder="0" allowfullscreen></iframe>');
 }