コード例 #1
0
 public function testRetrieveMostViewedVideosV2()
 {
     $this->gdata->setMajorProtocolVersion(2);
     $feed = $this->gdata->getMostViewedVideoFeed();
     $client = $this->gdata->getHttpClient();
     $positionOfAPIProjection = strpos($client->getLastRawRequest(), "/feeds/api/");
     $this->assertTrue(is_numeric($positionOfAPIProjection));
 }
コード例 #2
0
ファイル: YouTubeOnlineTest.php プロジェクト: navassouza/zf2
 public function testRetrieveMostViewedVideos()
 {
     $feed = $this->gdata->getMostViewedVideoFeed();
     $this->assertTrue($feed->totalResults->text > 10);
     $this->assertEquals('Most Viewed', $feed->title->text);
     $this->assertTrue(count($feed->entry) > 0);
     foreach ($feed->entry as $entry) {
         if ($entry->rating) {
             $this->assertEquals(1, $entry->rating->min);
             $this->assertEquals(5, $entry->rating->max);
         }
     }
 }