Exemplo n.º 1
0
 public function testGetVideoThumbnails()
 {
     $this->entry->transferFromXML($this->entryText);
     $videoEntry = $this->entry;
     $mediaThumbnails1 = $videoEntry->getMediaGroup()->getThumbnail();
     $mediaThumbnails2 = $videoEntry->getVideoThumbnails();
     $this->assertEquals(count($mediaThumbnails1), count($mediaThumbnails2));
     $foundThumbnail = false;
     foreach ($mediaThumbnails2 as $thumbnail) {
         if ($thumbnail['url'] == 'http://img.youtube.com/vi/UMFI1hdm96E/1.jpg') {
             $foundThumbnail = true;
             $this->assertEquals(97, $thumbnail['height']);
             $this->assertEquals(130, $thumbnail['width']);
             $this->assertEquals('00:01:03.750', $thumbnail['time']);
         }
     }
     $this->assertTrue($foundThumbnail);
     $newEntry = new Zend_Gdata_YouTube_VideoEntry();
     $this->assertEquals(array(), $newEntry->getVideoThumbnails());
 }