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()); } }
/** * @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()); }
/** * 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); }