Exemple #1
0
 public function testRetrieveFriendFeed()
 {
     $developerKey = constant('TESTS_ZEND_GDATA_YOUTUBE_DEVELOPER_KEY');
     $clientId = constant('TESTS_ZEND_GDATA_YOUTUBE_CLIENT_ID');
     $client = Zend_Gdata_ClientLogin::getHttpClient($this->user, $this->pass, 'youtube', null, 'ZF_UnitTest', null, null, 'https://www.google.com/youtube/accounts/ClientLogin');
     $youtube = new Zend_Gdata_YouTube($client, 'ZF_UnitTest', $clientId, $developerKey);
     $youtube->setMajorProtocolVersion(2);
     $feed = $youtube->getFriendActivityForCurrentUser();
     $this->assertTrue($feed instanceof Zend_Gdata_YouTube_ActivityFeed);
     $this->assertTrue(count($feed->entries) > 0);
     $this->assertEquals('Activity of the friends of ' . $this->ytAccount, $feed->title->text);
 }