Ejemplo n.º 1
0
 public function testPeformV2Query_Uploader()
 {
     $this->gdata->setMajorProtocolVersion(2);
     $query = $this->gdata->newVideoQuery();
     $query->setUploader('partner');
     $videoFeed = $this->gdata->getVideoFeed($query);
     $this->assertTrue(count($videoFeed->entry) > 0, 'Could not retrieve a single entry for uploader=partner search:' . $query->getQueryUrl(2));
     foreach ($videoFeed as $videoEntry) {
         $mg = $videoEntry->getMediaGroup();
         $this->assertEquals('partner', $mg->getMediaCredit()->getYTtype());
     }
 }
Ejemplo n.º 2
0
 /**
  * test related to ZF2-303
  */
 public function testQueryWithGetFeed()
 {
     if (!constant('TESTS_ZEND_GDATA_ONLINE_ENABLED')) {
         $this->markTestSkipped('ZendGData online tests are not enabled');
     }
     $youtube = new YouTube();
     $query = $youtube->newVideoQuery();
     $query->videoQuery = 'php';
     $query->startIndex = 0;
     $query->maxResults = 20;
     $query->orderBy = 'viewCount';
     $videoFeed = $youtube->getVideoFeed($query);
     $this->assertTrue($videoFeed->count() > 10);
 }