예제 #1
0
    public function testRetrieveFriendFeed()
    {
        $developerKey = constant(
            'TESTS_ZEND_GDATA_YOUTUBE_DEVELOPER_KEY');
        $clientId = constant(
            'TESTS_ZEND_GDATA_YOUTUBE_CLIENT_ID');
        $client = GData\ClientLogin::getHttpClient(
            $this->user, $this->pass, 'youtube' , null, 'ZF_UnitTest', null, null,
            'https://www.google.com/youtube/accounts/ClientLogin');

        $youtube = new YouTube($client, 'ZF_UnitTest',
            $clientId, $developerKey);
        $youtube->setMajorProtocolVersion(2);

        $feed = $youtube->getFriendActivityForCurrentUser();
        $this->assertTrue($feed instanceof YouTube\ActivityFeed);
        $this->assertTrue((count($feed->entries) > 0));
        $this->assertEquals('Activity of the friends of ' . $this->ytAccount,
            $feed->title->text);
    }