コード例 #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());
     }
 }
コード例 #2
0
ファイル: VideoQueryTest.php プロジェクト: rikaix/zf2
 /**
  * @group ZF-8720
  */
 public function testQueryExclamationMarkRemoveBug()
 {
     $yt = new YouTube();
     $query = $yt->newVideoQuery();
     $location = '37.42307,-122.08427';
     $this->assertNull($query->setLocation($location));
     $this->assertEquals($location, $query->getLocation());
     $location = '37.42307,-122.08427!';
     $this->assertNull($query->setLocation($location));
     $this->assertEquals($location, $query->getLocation());
 }
コード例 #3
0
ファイル: VideoQueryTest.php プロジェクト: navassouza/zf2
 /**
  * test related to ZF2-303
  */
 public function testQueryWithGetFeed()
 {
     if (!constant('TESTS_ZEND_GDATA_ONLINE_ENABLED')) {
         $this->markTestSkipped('Zend_GData 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);
 }