From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../tests/Zend/Gdata/YouTube/ActivityEntryTest.php | 153 ++ zend/tests/Zend/Gdata/YouTube/ActivityFeedTest.php | 149 ++ zend/tests/Zend/Gdata/YouTube/CommentEntryTest.php | 107 ++ zend/tests/Zend/Gdata/YouTube/CommentFeedTest.php | 109 ++ zend/tests/Zend/Gdata/YouTube/ContactEntryTest.php | 109 ++ zend/tests/Zend/Gdata/YouTube/ContactFeedTest.php | 109 ++ zend/tests/Zend/Gdata/YouTube/InboxEntryTest.php | 217 +++ zend/tests/Zend/Gdata/YouTube/InboxFeedTest.php | 182 +++ .../Zend/Gdata/YouTube/PlaylistListEntryTest.php | 239 ++++ .../Zend/Gdata/YouTube/PlaylistListFeedTest.php | 171 +++ .../Zend/Gdata/YouTube/PlaylistVideoEntryTest.php | 356 +++++ .../Zend/Gdata/YouTube/PlaylistVideoFeedTest.php | 112 ++ .../Zend/Gdata/YouTube/SubscriptionEntryTest.php | 332 +++++ .../Zend/Gdata/YouTube/SubscriptionFeedTest.php | 178 +++ .../Zend/Gdata/YouTube/UserProfileEntryTest.php | 253 ++++ zend/tests/Zend/Gdata/YouTube/VideoEntryTest.php | 767 ++++++++++ zend/tests/Zend/Gdata/YouTube/VideoFeedTest.php | 109 ++ zend/tests/Zend/Gdata/YouTube/VideoQueryTest.php | 277 ++++ .../YouTube/_files/ActivityEntryDataSample1.xml | 23 + .../YouTube/_files/ActivityFeedDataSample1.xml | 47 + .../YouTube/_files/CommentEntryDataSample1.xml | 20 + .../YouTube/_files/CommentFeedDataSample1.xml | 112 ++ .../YouTube/_files/ContactEntryDataSample1.xml | 26 + .../YouTube/_files/ContactFeedDataSample1.xml | 51 + .../_files/FormUploadTokenResponseSample.xml | 1 + .../Gdata/YouTube/_files/InboxEntryDataSample1.xml | 82 ++ .../YouTube/_files/InboxEntryDataSampleV2.xml | 88 ++ .../Gdata/YouTube/_files/InboxFeedDataSample1.xml | 107 ++ .../Gdata/YouTube/_files/InboxFeedDataSampleV2.xml | 119 ++ .../_files/PlaylistListEntryDataSample1.xml | 30 + .../_files/PlaylistListEntryDataSampleV2.xml | 16 + .../YouTube/_files/PlaylistListFeedDataSample1.xml | 79 ++ .../_files/PlaylistListFeedDataSampleV2.xml | 553 ++++++++ .../_files/PlaylistListVideoEntryDataSampleV2.xml | 66 + .../_files/PlaylistVideoEntryDataSample1.xml | 109 ++ .../_files/PlaylistVideoEntryDataSampleV2.xml | 89 ++ .../_files/PlaylistVideoFeedDataSample1.xml | 1495 ++++++++++++++++++++ .../_files/SubscriptionEntryDataSample1.xml | 29 + .../_files/SubscriptionEntryDataSampleV2.xml | 33 + .../SubscriptionEntryDataSample_channelV2.xml | 33 + .../SubscriptionEntryDataSample_favoritesV2.xml | 30 + .../SubscriptionEntryDataSample_playlistV2.xml | 32 + .../_files/SubscriptionEntryDataSample_queryV2.xml | 31 + .../YouTube/_files/SubscriptionFeedDataSample1.xml | 105 ++ .../_files/SubscriptionFeedDataSampleV2.xml | 138 ++ .../YouTube/_files/UserProfileEntryDataSample1.xml | 47 + .../_files/UserProfileEntryDataSampleV2.xml | 71 + .../Gdata/YouTube/_files/VideoEntryDataSample1.xml | 138 ++ .../YouTube/_files/VideoEntryDataSamplePrivate.xml | 139 ++ .../YouTube/_files/VideoEntryDataSampleV2.xml | 63 + .../Gdata/YouTube/_files/VideoFeedDataSample1.xml | 743 ++++++++++ 51 files changed, 8674 insertions(+) create mode 100644 zend/tests/Zend/Gdata/YouTube/ActivityEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/ActivityFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/CommentEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/CommentFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/ContactEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/ContactFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/InboxEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/InboxFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/UserProfileEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/VideoEntryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/VideoFeedTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/VideoQueryTest.php create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml create mode 100755 zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml create mode 100755 zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistListVideoEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_favoritesV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_playlistV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_queryV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml create mode 100755 zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml create mode 100644 zend/tests/Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml (limited to 'zend/tests/Zend/Gdata/YouTube') diff --git a/zend/tests/Zend/Gdata/YouTube/ActivityEntryTest.php b/zend/tests/Zend/Gdata/YouTube/ActivityEntryTest.php new file mode 100644 index 0000000..5f925d7 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/ActivityEntryTest.php @@ -0,0 +1,153 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml', + true); + $this->entry = new Zend_Gdata_YouTube_ActivityEntry(); + $this->entry->setMajorProtocolVersion(2); + } + + private function verifyAllSamplePropertiesAreCorrect ($activityEntry) { + $this->assertEquals( + 'tag:youtube.com,2008:event:Z2RweXRob24xMTIzNDMwMDAyMzI5NTQ2N' . + 'zg2MA%3D%3D', + $activityEntry->id->text); + $this->assertEquals('2009-01-16T09:13:49.000-08:00', + $activityEntry->updated->text); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/userevents.cat', + $activityEntry->category[0]->scheme); + $this->assertEquals('video_favorited', + $activityEntry->category[0]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $activityEntry->category[1]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#userEvent', + $activityEntry->category[1]->term); + $this->assertEquals('tayzonzay has favorited a video', + $activityEntry->title->text);; + + $this->assertEquals('self', $activityEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $activityEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/events/VGF5Wm9uZGF5MzEyaIl2' . + 'MTMxOTcxMDk3NzQ5MzM%3D?v=2', + $activityEntry->getLink('self')->href); + + $this->assertEquals('alternate', + $activityEntry->getLink('alternate')->rel); + $this->assertEquals('text/html', + $activityEntry->getLink('alternate')->type); + $this->assertEquals('http://www.youtube.com', + $activityEntry->getLink('alternate')->href); + + $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', + $activityEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video')->rel); + $this->assertEquals('application/atom+xml', $activityEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/z3U0kuLH974?v=2', + $activityEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video')->href); + + $this->assertEquals('tayzonzay', $activityEntry->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/tayzonzay', + $activityEntry->author[0]->uri->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptyActivityEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newActivityEntry = new Zend_Gdata_YouTube_ActivityEntry(); + $newActivityEntry->transferFromXML($entryXml); + $newActivityEntryXml = $newActivityEntry->saveXML(); + $this->assertTrue($entryXml == $newActivityEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testHelperMethods() { + $this->entry->transferFromXML($this->entryText); + $this->assertEquals('z3U0kuLH974', + $this->entry->getVideoId()->getText()); + $this->assertEquals('foo', + $this->entry->getUsername()->getText()); + $this->assertEquals('2', + $this->entry->getRatingValue()); + $this->assertEquals('video_favorited', + $this->entry->getActivityType()); + } + + public function testConvertActivityEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newActivityEntry = new Zend_Gdata_YouTube_ActivityEntry(); + $newActivityEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newActivityEntry); + $newActivityEntryXml = $newActivityEntry->saveXML(); + $this->assertEquals($entryXml, $newActivityEntryXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/ActivityFeedTest.php b/zend/tests/Zend/Gdata/YouTube/ActivityFeedTest.php new file mode 100644 index 0000000..ae70798 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/ActivityFeedTest.php @@ -0,0 +1,149 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml', + true); + $this->feed = new Zend_Gdata_YouTube_ActivityFeed(); + $this->feed->setMajorProtocolVersion(2); + } + + private function verifyAllSamplePropertiesAreCorrect ($activityFeed) { + $this->assertEquals('2009-01-28T09:13:49.000-08:00', + $activityFeed->updated->text); + $this->assertEquals( + 'http://schemas.google.com/g/2005#kind', + $activityFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#userEvent', + $activityFeed->category[0]->term); + $this->assertEquals('Activity of tayzonzay', + $activityFeed->title->text);; + + $this->assertEquals('self', $activityFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $activityFeed->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/events?author=gdpython' . + '&start-index=1&max-results=25&v=2', + $activityFeed->getLink('self')->href); + $this->assertEquals('http://schemas.google.com/g/2005#feed', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#feed')->rel); + $this->assertEquals('application/atom+xml', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#feed')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/api/events?v=2', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#feed')->href); + $this->assertEquals('http://schemas.google.com/g/2005#batch', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#batch')->rel); + $this->assertEquals('application/atom+xml', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#batch')->type); + $this->assertEquals( + 'application/atom+xml', + $activityFeed->getLink( + 'http://schemas.google.com/g/2005#batch')->type); + $this->assertEquals('service', + $activityFeed->getLink('service')->rel); + $this->assertEquals('application/atomsvc+xml', + $activityFeed->getLink('service')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/events?alt=atom-service&v=2', + $activityFeed->getLink('service')->href); + + $this->assertEquals('YouTube', $activityFeed->author[0]->name->text); + $this->assertEquals('http://www.youtube.com/', + $activityFeed->author[0]->uri->text); + $this->assertEquals(12, $activityFeed->totalResults->text); + $this->assertEquals(1, $activityFeed->startIndex->text); + $this->assertEquals(25, $activityFeed->itemsPerPage->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testEmptyActivityFeedToAndFromStringShouldMatch() { + $entryXml = $this->feed->saveXML(); + $newActivityFeed = new Zend_Gdata_YouTube_ActivityFeed(); + $newActivityFeed->transferFromXML($entryXml); + $newActivityFeedXml = $newActivityFeed->saveXML(); + $this->assertTrue($entryXml == $newActivityFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testConvertActivityFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $entryXml = $this->feed->saveXML(); + $newActivityFeed = new Zend_Gdata_YouTube_ActivityFeed(); + $newActivityFeed->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newActivityFeed); + $newActivityFeedXml = $newActivityFeed->saveXML(); + $this->assertEquals($entryXml, $newActivityFeedXml); + } + + public function testEntryCanBeRetrieved() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(count($this->feed->entries) > 0); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/CommentEntryTest.php b/zend/tests/Zend/Gdata/YouTube/CommentEntryTest.php new file mode 100644 index 0000000..7ffad58 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/CommentEntryTest.php @@ -0,0 +1,107 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml', + true); + $this->entry = new Zend_Gdata_YouTube_CommentEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($commentEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052', + $commentEntry->id->text); + $this->assertEquals('2007-09-02T18:00:04.000-07:00', $commentEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $commentEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#comment', $commentEntry->category[0]->term); + $this->assertEquals('text', $commentEntry->title->type); + $this->assertEquals('how to turn ...', $commentEntry->title->text);; + $this->assertEquals('text', $commentEntry->content->type); + $this->assertEquals('how to turn rejection and heartbreak into something positive is the big mystery of life but you\'re managed to turn it to your advantage with a beautiful song. Who was she?', $commentEntry->content->text);; + $this->assertEquals('self', $commentEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $commentEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052', $commentEntry->getLink('self')->href); + $this->assertEquals('reneemathome', $commentEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/reneemathome', $commentEntry->author[0]->uri->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptyCommentEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newCommentEntry = new Zend_Gdata_YouTube_CommentEntry(); + $newCommentEntry->transferFromXML($entryXml); + $newCommentEntryXml = $newCommentEntry->saveXML(); + $this->assertTrue($entryXml == $newCommentEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testConvertCommentEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newCommentEntry = new Zend_Gdata_YouTube_CommentEntry(); + $newCommentEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newCommentEntry); + $newCommentEntryXml = $newCommentEntry->saveXML(); + $this->assertEquals($entryXml, $newCommentEntryXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/CommentFeedTest.php b/zend/tests/Zend/Gdata/YouTube/CommentFeedTest.php new file mode 100644 index 0000000..2da13f4 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/CommentFeedTest.php @@ -0,0 +1,109 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml', + true); + $this->feed = new Zend_Gdata_YouTube_CommentFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($commentFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments', + $commentFeed->id->text); + $this->assertEquals('2007-09-21T02:32:55.032Z', $commentFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $commentFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#comment', $commentFeed->category[0]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $commentFeed->logo->text); + $this->assertEquals('text', $commentFeed->title->type); + $this->assertEquals('Comments on \'"That Girl" - Original Song - Acoustic Version\'', $commentFeed->title->text);; + $this->assertEquals('self', $commentFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $commentFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments?start-index=1&max-results=4', $commentFeed->getLink('self')->href); + $this->assertEquals('YouTube', $commentFeed->author[0]->name->text); + $this->assertEquals('http://www.youtube.com/', $commentFeed->author[0]->uri->text); + $this->assertEquals(100, $commentFeed->totalResults->text); + $this->assertEquals(1, $commentFeed->startIndex->text); + $this->assertEquals(4, $commentFeed->itemsPerPage->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testEmptyCommentFeedToAndFromStringShouldMatch() { + $entryXml = $this->feed->saveXML(); + $newCommentFeed = new Zend_Gdata_YouTube_CommentFeed(); + $newCommentFeed->transferFromXML($entryXml); + $newCommentFeedXml = $newCommentFeed->saveXML(); + $this->assertTrue($entryXml == $newCommentFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testConvertCommentFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $entryXml = $this->feed->saveXML(); + $newCommentFeed = new Zend_Gdata_YouTube_CommentFeed(); + $newCommentFeed->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newCommentFeed); + $newCommentFeedXml = $newCommentFeed->saveXML(); + $this->assertEquals($entryXml, $newCommentFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/ContactEntryTest.php b/zend/tests/Zend/Gdata/YouTube/ContactEntryTest.php new file mode 100644 index 0000000..23b461a --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/ContactEntryTest.php @@ -0,0 +1,109 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml', + true); + $this->entry = new Zend_Gdata_YouTube_ContactEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($contactEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser', + $contactEntry->id->text); + $this->assertEquals('2007-09-21T02:44:41.134Z', $contactEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $contactEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#friend', $contactEntry->category[0]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/contact.cat', $contactEntry->category[1]->scheme); + $this->assertEquals('Friends', $contactEntry->category[1]->term); + $this->assertEquals('text', $contactEntry->title->type); + $this->assertEquals('testuser', $contactEntry->title->text);; + $this->assertEquals('self', $contactEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $contactEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser', $contactEntry->getLink('self')->href); + $this->assertEquals('davidchoimusic', $contactEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $contactEntry->author[0]->uri->text); + $this->assertEquals('testuser', $contactEntry->username->text); + $this->assertEquals('accepted', $contactEntry->status->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptyContactEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newContactEntry = new Zend_Gdata_YouTube_ContactEntry(); + $newContactEntry->transferFromXML($entryXml); + $newContactEntryXml = $newContactEntry->saveXML(); + $this->assertTrue($entryXml == $newContactEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testConvertContactEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newContactEntry = new Zend_Gdata_YouTube_ContactEntry(); + $newContactEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newContactEntry); + $newContactEntryXml = $newContactEntry->saveXML(); + $this->assertEquals($entryXml, $newContactEntryXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/ContactFeedTest.php b/zend/tests/Zend/Gdata/YouTube/ContactFeedTest.php new file mode 100644 index 0000000..e561daf --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/ContactFeedTest.php @@ -0,0 +1,109 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml', + true); + $this->feed = new Zend_Gdata_YouTube_ContactFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($contactFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts', + $contactFeed->id->text); + $this->assertEquals('2007-09-21T02:44:41.135Z', $contactFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $contactFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#friend', $contactFeed->category[0]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $contactFeed->logo->text); + $this->assertEquals('text', $contactFeed->title->type); + $this->assertEquals('davidchoimusic\'s Contacts', $contactFeed->title->text);; + $this->assertEquals('self', $contactFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $contactFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/contacts?start-index=1&max-results=5', $contactFeed->getLink('self')->href); + $this->assertEquals('davidchoimusic', $contactFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $contactFeed->author[0]->uri->text); + $this->assertEquals(1558, $contactFeed->totalResults->text); + $this->assertEquals(1, $contactFeed->startIndex->text); + $this->assertEquals(5, $contactFeed->itemsPerPage->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testEmptyContactFeedToAndFromStringShouldMatch() { + $entryXml = $this->feed->saveXML(); + $newContactFeed = new Zend_Gdata_YouTube_ContactFeed(); + $newContactFeed->transferFromXML($entryXml); + $newContactFeedXml = $newContactFeed->saveXML(); + $this->assertTrue($entryXml == $newContactFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testConvertContactFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $entryXml = $this->feed->saveXML(); + $newContactFeed = new Zend_Gdata_YouTube_ContactFeed(); + $newContactFeed->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newContactFeed); + $newContactFeedXml = $newContactFeed->saveXML(); + $this->assertEquals($entryXml, $newContactFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/InboxEntryTest.php b/zend/tests/Zend/Gdata/YouTube/InboxEntryTest.php new file mode 100644 index 0000000..c4b2e5e --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/InboxEntryTest.php @@ -0,0 +1,217 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml', + true); + $this->v2entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/' . + 'InboxEntryDataSampleV2.xml', + true); + + $this->entry = new Zend_Gdata_YouTube_InboxEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($InboxEntry) { + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/' . + 'inbox/ffb9a5f32cd5f55', + $InboxEntry->id->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $InboxEntry->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#videoMessage', + $InboxEntry->category[0]->term); + $this->assertEquals('andyland74sFriend sent you a video!', + $InboxEntry->title->text);; + $this->assertEquals('self', + $InboxEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $InboxEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/' . + 'inbox/ffb9a5f32cd5f55', + $InboxEntry->getLink('self')->href); + $this->assertEquals('andyland74sFriend', + $InboxEntry->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74sFriend', + $InboxEntry->author[0]->uri->text); + $this->assertEquals( + 'Check out this video!', + $InboxEntry->getDescription()->text); + } + + public function verifyAllSamplePropertiesAreCorrectV2( + $InboxEntry) { + $this->assertEquals( + 'tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U', + $InboxEntry->id->text); + $this->assertEquals('2008-06-10T13:55:32.000-07:00', + $InboxEntry->published->text); + $this->assertEquals('2008-06-10T13:55:32.000-07:00', + $InboxEntry->updated->text); + $this->assertEquals( + 'http://schemas.google.com/g/2005#kind', + $InboxEntry->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#videoMessage', + $InboxEntry->category[0]->term); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/keywords.cat', + $InboxEntry->category[1]->scheme); + $this->assertEquals( + 'surfing', + $InboxEntry->category[1]->term); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/categories.cat', + $InboxEntry->category[2]->scheme); + $this->assertEquals( + 'People', + $InboxEntry->category[2]->term); + $this->assertEquals('self', + $InboxEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $InboxEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/' . + 'inbox/ffb9a5f32cd5f55?v=2', + $InboxEntry->getLink('self')->href); + $this->assertEquals('related', + $InboxEntry->getLink('related')->rel); + $this->assertEquals('application/atom+xml', + $InboxEntry->getLink('related')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs?v=2', + $InboxEntry->getLink('related')->href); + $this->assertEquals('alternate', + $InboxEntry->getLink('alternate')->rel); + $this->assertEquals('text/html', + $InboxEntry->getLink('alternate')->type); + $this->assertEquals( + 'http://www.youtube.com/watch?v=jXE6G9CYcJs', + $InboxEntry->getLink('alternate')->href); + $this->assertEquals('andyland74sFriend', + $InboxEntry->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74sFriend', + $InboxEntry->author[0]->uri->text); + $this->assertEquals(877, $InboxEntry->getRating()->numRaters); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/jXE6G9CYcJs/comments', + $InboxEntry->getComments()->getFeedLink()->getHref()); + $this->assertEquals(286355, + $InboxEntry->getStatistics()->getViewCount()); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->v2entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->v2entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testEmptyInboxEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry(); + $newInboxEntry->transferFromXML($entryXml); + $newInboxEntryXml = $newInboxEntry->saveXML(); + $this->assertTrue($entryXml == $newInboxEntryXml); + } + + public function testEmptyInboxEntryToAndFromStringShouldMatchV2() { + $this->entry->transferFromXML($this->v2entryText); + $entryXml = $this->entry->saveXML(); + $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry(); + $newInboxEntry->transferFromXML($entryXml); + $newInboxEntry->setMajorProtocolVersion(2); + $newInboxEntryXml = $newInboxEntry->saveXML(); + $this->assertTrue($entryXml == $newInboxEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->v2entryText); + $this->verifyAllSamplePropertiesAreCorrectV2($this->entry); + } + + public function testConvertInboxEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newInboxEntry = new Zend_Gdata_YouTube_InboxEntry(); + $newInboxEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newInboxEntry); + $newInboxEntryXml = $newInboxEntry->saveXML(); + $this->assertEquals($entryXml, $newInboxEntryXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/InboxFeedTest.php b/zend/tests/Zend/Gdata/YouTube/InboxFeedTest.php new file mode 100644 index 0000000..a7a63cd --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/InboxFeedTest.php @@ -0,0 +1,182 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml', + true); + $this->V2feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml', + true); + $this->feed = new Zend_Gdata_YouTube_InboxFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($inboxFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/' . + 'default/inbox', + $inboxFeed->id->text); + $this->assertEquals('2008-06-10T20:55:40.271Z', + $inboxFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $inboxFeed->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#videoMessage', + $inboxFeed->category[0]->term); + $this->assertEquals( + 'http://www.youtube.com/img/pic_youtubelogo_123x63.gif', + $inboxFeed->logo->text); + $this->assertEquals('text', $inboxFeed->title->type); + $this->assertEquals('Inbox of andyland74', + $inboxFeed->title->text);; + $this->assertEquals('self', $inboxFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $inboxFeed->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...', + $inboxFeed->getLink('self')->href); + $this->assertEquals('andyland74', $inboxFeed->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74', + $inboxFeed->author[0]->uri->text); + $this->assertEquals(1, $inboxFeed->totalResults->text); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($inboxFeed) { + $this->assertEquals('tag:youtube,2008:user:andyland74:inbox', + $inboxFeed->id->text); + $this->assertEquals('2008-07-21T17:54:30.236Z', + $inboxFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $inboxFeed->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#videoMessage', + $inboxFeed->category[0]->term); + $this->assertEquals( + 'http://www.youtube.com/img/pic_youtubelogo_123x63.gif', + $inboxFeed->logo->text); + $this->assertEquals('Inbox of andyland74', + $inboxFeed->title->text);; + $this->assertEquals('andyland74', + $inboxFeed->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74', + $inboxFeed->author[0]->uri->text); + $this->assertEquals('self', $inboxFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $inboxFeed->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?...', + $inboxFeed->getLink('self')->href); + $this->assertEquals('alternate', $inboxFeed->getLink('alternate')->rel); + $this->assertEquals('text/html', + $inboxFeed->getLink('alternate')->type); + $this->assertEquals( + 'http://www.youtube.com/my_messages?folder=inbox&filter=videos', + $inboxFeed->getLink('alternate')->href); + $this->assertEquals('service', $inboxFeed->getLink('service')->rel); + $this->assertEquals('application/atomsvc+xml', + $inboxFeed->getLink('service')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/andyland74/inbox?' . + 'alt=...', + $inboxFeed->getLink('service')->href); + + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testEmptyInboxFeedToAndFromStringShouldMatch() { + $feedXml = $this->feed->saveXML(); + $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed(); + $newInboxFeed->transferFromXML($feedXml); + $newInboxFeedXml = $newInboxFeed->saveXML(); + $this->assertTrue($feedXml == $newInboxFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->feed->transferFromXML($this->V2feedText); + $this->verifyAllSamplePropertiesAreCorrectV2($this->feed); + } + + public function testConvertInboxFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $feedXml = $this->feed->saveXML(); + $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed(); + $newInboxFeed->transferFromXML($feedXml); + $this->verifyAllSamplePropertiesAreCorrect($newInboxFeed); + $newInboxFeedXml = $newInboxFeed->saveXML(); + $this->assertEquals($feedXml, $newInboxFeedXml); + } + + public function testConvertInboxFeedToAndFromStringV2() { + $this->feed->setMajorProtocolVersion(2); + $this->feed->transferFromXML($this->V2feedText); + $feedXml = $this->feed->saveXML(); + $newInboxFeed = new Zend_Gdata_YouTube_InboxFeed(); + $newInboxFeed->transferFromXML($feedXml); + $newInboxFeed->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($newInboxFeed); + $newInboxFeedXml = $newInboxFeed->saveXML(); + $this->assertEquals($feedXml, $newInboxFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php b/zend/tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php new file mode 100644 index 0000000..34e1069 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/PlaylistListEntryTest.php @@ -0,0 +1,239 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml', + true); + $this->v2entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml', + true); + $this->entry = new Zend_Gdata_YouTube_PlaylistListEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($playlistListEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7', + $playlistListEntry->id->text); + $this->assertEquals('2007-09-20T13:42:19.000-07:00', $playlistListEntry->updated->text); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/tags.cat', $playlistListEntry->category[0]->scheme); + $this->assertEquals('music', $playlistListEntry->category[0]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[1]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListEntry->category[1]->term); + $this->assertEquals('text', $playlistListEntry->title->type); + $this->assertEquals('YouTube Musicians', $playlistListEntry->title->text);; + $this->assertEquals('text', $playlistListEntry->content->type); + $this->assertEquals('Music from talented people on YouTube.', $playlistListEntry->content->text);; + $this->assertEquals('self', $playlistListEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7', $playlistListEntry->getLink('self')->href); + $this->assertEquals('testuser', $playlistListEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistListEntry->author[0]->uri->text); + $this->assertEquals('Music from talented people on YouTube.', $playlistListEntry->description->text); + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7', $playlistListEntry->getPlaylistVideoFeedUrl()); + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7', $playlistListEntry->feedLink[0]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistListEntry->feedLink[0]->rel); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($playlistListEntry) { + $this->assertEquals('tag:youtube.com,2008:user:googledevelopers:playlist:8E2186857EE27746', + $playlistListEntry->id->text); + $this->assertEquals('2008-12-10T09:56:03.000Z', $playlistListEntry->updated->text); + $this->assertEquals('2007-08-23T21:48:43.000Z', $playlistListEntry->published->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListEntry->category[0]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListEntry->category[0]->scheme); + $this->assertEquals('Non-google Interviews', $playlistListEntry->title->text); + $this->assertEquals('This playlist contains interviews with people outside of Google.', $playlistListEntry->summary->text); + + $this->assertEquals('self', $playlistListEntry->getLink('self')->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers/playlists/8E2186857EE27746?v=2', $playlistListEntry->getLink('self')->href); + $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('self')->type); + $this->assertEquals('alternate', $playlistListEntry->getLink('alternate')->rel); + $this->assertEquals('http://www.youtube.com/view_play_list?p=8E2186857EE27746', $playlistListEntry->getLink('alternate')->href); + $this->assertEquals('text/html', $playlistListEntry->getLink('alternate')->type); + $this->assertEquals('related', $playlistListEntry->getLink('related')->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers?v=2', $playlistListEntry->getLink('related')->href); + $this->assertEquals('application/atom+xml', $playlistListEntry->getLink('related')->type); + $this->assertEquals('googledevelopers', $playlistListEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/googledevelopers', $playlistListEntry->author[0]->uri->text); + + $this->assertEquals('8E2186857EE27746', $playlistListEntry->getPlaylistId()->text); + $this->assertEquals('1', $playlistListEntry->getCountHint()->text); + + $this->assertEquals('application/atom+xml;type=feed', $playlistListEntry->getContent()->getType()); + $this->assertEquals('http://gdata.youtube.com/feeds/api/playlists/8E2186857EE27746?v=2', $playlistListEntry->getContent()->getSrc()); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testEmptyPlaylistListEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry(); + $newPlaylistListEntry->transferFromXML($entryXml); + $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML(); + $this->assertTrue($entryXml == $newPlaylistListEntryXml); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->transferFromXML($this->entryText); + $this->entry->setMajorProtocolVersion(2); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->transferFromXML($this->entryText); + $this->entry->setMajorProtocolVersion(2); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals(2, count($this->entry->feedLink)); + } + + public function testGetFeedLinkCanReturnEntriesByRelValue() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals($entry1, $this->entry->getFeedLink('first')); + $this->assertEquals($entry2, $this->entry->getFeedLink('second')); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->entry->transferFromXML($this->v2entryText); + $this->entry->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($this->entry); + } + + public function testConvertPlaylistListEntryToAndFromStringV2() { + $this->entry->transferFromXML($this->v2entryText); + $entryXml = $this->entry->saveXML(); + $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry(); + $newPlaylistListEntry->transferFromXML($entryXml); + $newPlaylistListEntry->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($newPlaylistListEntry); + $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML(); + $this->assertEquals($entryXml, $newPlaylistListEntryXml); + } + + public function testConvertPlaylistListEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newPlaylistListEntry = new Zend_Gdata_YouTube_PlaylistListEntry(); + $newPlaylistListEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newPlaylistListEntry); + $newPlaylistListEntryXml = $newPlaylistListEntry->saveXML(); + $this->assertEquals($entryXml, $newPlaylistListEntryXml); + } + + public function testGettingCountHintOnV1EntryShouldThrowException() { + $exceptionCaught = false; + $this->entry->transferFromXML($this->entryText); + try { + $this->entry->getCountHint(); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Calling getCountHint on a v1 ' . + 'playlistListEntry should throw an exception'); + } + + public function testGettingPlaylistIdOnV1EntryShouldThrowException() { + $exceptionCaught = false; + $this->entry->transferFromXML($this->entryText); + try { + $this->entry->getPlaylistId(); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Calling getPlaylistId on a v1 ' . + 'playlistListEntry should throw an exception'); + } + + public function testGetPlaylistVideoFeedUrlWorksInV2() { + $this->entry->transferFromXML($this->v2entryText); + $this->entry->setMajorProtocolVersion(2); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/playlists/8E2186857EE27746?v=2', + $this->entry->getPlaylistVideoFeedUrl()); + } +} diff --git a/zend/tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php b/zend/tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php new file mode 100644 index 0000000..477f19b --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/PlaylistListFeedTest.php @@ -0,0 +1,171 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml', + true); + $this->V2feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml', + true); + + $this->feed = new Zend_Gdata_YouTube_PlaylistListFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($playlistListFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists', + $playlistListFeed->id->text); + $this->assertEquals('2007-09-20T20:59:47.530Z', $playlistListFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistListFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlistLink', $playlistListFeed->category[0]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $playlistListFeed->logo->text); + $this->assertEquals('text', $playlistListFeed->title->type); + $this->assertEquals('testuser\'s Playlists', $playlistListFeed->title->text);; + $this->assertEquals('self', $playlistListFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $playlistListFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/playlists?start-index=1&max-results=25', $playlistListFeed->getLink('self')->href); + $this->assertEquals('testuser', $playlistListFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistListFeed->author[0]->uri->text); + $this->assertEquals(2, $playlistListFeed->totalResults->text); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($playlistListFeed) { + $this->assertEquals('tag:youtube.com,2008:user:GoogleDevelopers:playlists', + $playlistListFeed->id->text); + $this->assertEquals('2008-12-10T09:56:03.000Z', + $playlistListFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $playlistListFeed->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#playlistLink', + $playlistListFeed->category[0]->term); + $this->assertEquals( + 'http://www.youtube.com/img/pic_youtubelogo_123x63.gif', + $playlistListFeed->logo->text); + $this->assertEquals('Playlists of GoogleDevelopers', + $playlistListFeed->title->text);; + $this->assertEquals('self', $playlistListFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $playlistListFeed->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/GoogleDevelopers/' . + 'playlists?start-index=1&max-results=25&v=2', + $playlistListFeed->getLink('self')->href); + $this->assertEquals('GoogleDevelopers', + $playlistListFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/' . + 'googledevelopers', $playlistListFeed->author[0]->uri->text); + $this->assertEquals(70, $playlistListFeed->totalResults->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->feed->setMajorProtocolVersion(2); + $this->feed->transferFromXML($this->V2feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->feed->setMajorProtocolVersion(2); + $this->feed->transferFromXML($this->V2feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testEmptyPlaylistListFeedToAndFromStringShouldMatch() { + $feedXml = $this->feed->saveXML(); + $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed(); + $newPlaylistListFeed->transferFromXML($feedXml); + $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML(); + $this->assertTrue($feedXml == $newPlaylistListFeedXml); + } + + public function testEmptyPlaylistListFeedToAndFromStringShouldMatchV2() { + $this->feed->setMajorProtocolVersion(2); + $this->feed->transferFromXML($this->V2feedText); + $feedXml = $this->feed->saveXML(); + $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed(); + $newPlaylistListFeed->transferFromXML($feedXml); + $newPlaylistListFeed->setMajorProtocolVersion(2); + $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML(); + $this->assertTrue($feedXml == $newPlaylistListFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->feed->setMajorProtocolVersion(2); + $this->feed->transferFromXML($this->V2feedText); + $this->verifyAllSamplePropertiesAreCorrectV2($this->feed); + } + + public function testConvertPlaylistListFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $entryXml = $this->feed->saveXML(); + $newPlaylistListFeed = new Zend_Gdata_YouTube_PlaylistListFeed(); + $newPlaylistListFeed->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newPlaylistListFeed); + $newPlaylistListFeedXml = $newPlaylistListFeed->saveXML(); + $this->assertEquals($entryXml, $newPlaylistListFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php b/zend/tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php new file mode 100644 index 0000000..c6ffd65 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/PlaylistVideoEntryTest.php @@ -0,0 +1,356 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml', + true); + $this->V2entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml', + true); + $this->entry = new Zend_Gdata_YouTube_PlaylistVideoEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($playlistVideoEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21', + $playlistVideoEntry->id->text); + $this->assertEquals('2007-09-20T22:56:57.061Z', $playlistVideoEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistVideoEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistVideoEntry->category[0]->term); + $this->assertEquals('text', $playlistVideoEntry->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $playlistVideoEntry->title->text);; + $this->assertEquals('html', $playlistVideoEntry->content->type); + $this->assertEquals('self', $playlistVideoEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $playlistVideoEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21', $playlistVideoEntry->getLink('self')->href); + $this->assertEquals('davidchoimusic', $playlistVideoEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $playlistVideoEntry->author[0]->uri->text); + $mediaGroup = $playlistVideoEntry->mediaGroup; + + $this->assertEquals('plain', $mediaGroup->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text); + $this->assertEquals('plain', $mediaGroup->description->type); + $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text); + $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text); + $this->assertEquals(255, $mediaGroup->duration->seconds); + $this->assertEquals('Music', $mediaGroup->category[0]->label); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme); + $this->assertEquals('video', $mediaGroup->content[0]->medium); + $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url); + $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type); + $this->assertEquals('true', $mediaGroup->content[0]->isDefault); + $this->assertEquals('full', $mediaGroup->content[0]->expression); + $this->assertEquals(255, $mediaGroup->content[0]->duration); + $this->assertEquals(5, $mediaGroup->content[0]->format); + + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[0]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[0]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[1]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[1]->width); + $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[2]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[2]->width); + $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url); + $this->assertEquals(240, $mediaGroup->thumbnail[3]->height); + $this->assertEquals(320, $mediaGroup->thumbnail[3]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time); + + $this->assertEquals(113321, $playlistVideoEntry->statistics->viewCount); + $this->assertEquals(1, $playlistVideoEntry->rating->min); + $this->assertEquals(5, $playlistVideoEntry->rating->max); + $this->assertEquals(1005, $playlistVideoEntry->rating->numRaters); + $this->assertEquals(4.77, $playlistVideoEntry->rating->average); + $this->assertEquals(1, $playlistVideoEntry->position->text); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $playlistVideoEntry->comments->feedLink->href); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($playlistVideoEntry) { + $this->assertEquals( + 'tag:youtube.com,2008:playlist:4E6265CEF8BAA793:579617126485907C', + $playlistVideoEntry->id->text); + $this->assertEquals('2008-12-16T18:32:03.434Z', + $playlistVideoEntry->updated->text); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/keywords.cat', + $playlistVideoEntry->category[0]->scheme); + $this->assertEquals('dynamite', $playlistVideoEntry->category[0]->term); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/categories.cat', + $playlistVideoEntry->category[1]->scheme); + $this->assertEquals('News', $playlistVideoEntry->category[1]->term); + $this->assertEquals('News & Politics', + $playlistVideoEntry->category[1]->getLabel()); + $this->assertEquals( + 'http://schemas.google.com/g/2005#kind', + $playlistVideoEntry->category[2]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', + $playlistVideoEntry->category[2]->term); + $this->assertEquals('Paris Police Find Dynamite in Department Store', + $playlistVideoEntry->title->text);; + + $this->assertEquals('alternate', + $playlistVideoEntry->getLink('alternate')->rel); + $this->assertEquals('text/html', + $playlistVideoEntry->getLink('alternate')->type); + $this->assertEquals( + 'http://www.youtube.com/watch?v=Lur391T5ApY', + $playlistVideoEntry->getLink('alternate')->href); + + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#video.responses', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video.responses')->rel); + $this->assertEquals('application/atom+xml', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video.responses')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY/' . + 'responses?v=2', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#video.responses')->href); + + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#mobile', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#mobile')->rel); + $this->assertEquals('text/html', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#mobile')->type); + $this->assertEquals( + 'http://m.youtube.com/details?v=Lur391T5ApY', + $playlistVideoEntry->getLink( + 'http://gdata.youtube.com/schemas/2007#mobile')->href); + + $this->assertEquals('related', + $playlistVideoEntry->getLink('related')->rel); + $this->assertEquals('application/atom+xml', + $playlistVideoEntry->getLink('related')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY?v=2', + $playlistVideoEntry->getLink('related')->href); + + $this->assertEquals('self', + $playlistVideoEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $playlistVideoEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/playlists/4E6265CEF8BAA793/' . + '579617126485907C?v=2', + $playlistVideoEntry->getLink('self')->href); + + $this->assertEquals('zfgdata', + $playlistVideoEntry->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/zfgdata', + $playlistVideoEntry->author[0]->uri->text); + + $mediaGroup = $playlistVideoEntry->mediaGroup; + + $this->assertEquals('plain', $mediaGroup->title->type); + $this->assertEquals('Paris Police Find', + $mediaGroup->title->text); + $this->assertEquals('plain', $mediaGroup->description->type); + $this->assertEquals('French police found.', + $mediaGroup->description->text); + $this->assertEquals( + 'department, dynamite, explosives, find', + $mediaGroup->keywords->text); + $this->assertEquals(67, $mediaGroup->duration->seconds); + $this->assertEquals('News & Politics', + $mediaGroup->category[0]->label); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/categories.cat', + $mediaGroup->category[0]->scheme); + $this->assertEquals('video', $mediaGroup->content[0]->medium); + $this->assertEquals( + 'http://www.youtube.com/v/Lur391T5ApY&f=gdata_playlists', + $mediaGroup->content[0]->url); + $this->assertEquals('application/x-shockwave-flash', + $mediaGroup->content[0]->type); + $this->assertEquals('video', + $mediaGroup->content[0]->medium); + $this->assertEquals('true', $mediaGroup->content[0]->isDefault); + $this->assertEquals('full', $mediaGroup->content[0]->expression); + $this->assertEquals(67, $mediaGroup->content[0]->duration); + $this->assertEquals(5, $mediaGroup->content[0]->format); + + $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/2.jpg', + $mediaGroup->thumbnail[0]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[0]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[0]->width); + $this->assertEquals('00:00:33.500', $mediaGroup->thumbnail[0]->time); + $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/1.jpg', + $mediaGroup->thumbnail[1]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[1]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[1]->width); + $this->assertEquals('00:00:16.750', $mediaGroup->thumbnail[1]->time); + $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/3.jpg', + $mediaGroup->thumbnail[2]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[2]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[2]->width); + $this->assertEquals('00:00:50.250', $mediaGroup->thumbnail[2]->time); + $this->assertEquals('http://i.ytimg.com/vi/Lur391T5ApY/hqdefault.jpg', + $mediaGroup->thumbnail[3]->url); + $this->assertEquals(360, $mediaGroup->thumbnail[3]->height); + $this->assertEquals(480, $mediaGroup->thumbnail[3]->width); + $this->assertEquals('2008-12-16T17:01:42.000Z', + $mediaGroup->getUploaded()->text); + $this->assertEquals('AssociatedPress', + $mediaGroup->getMediaCredit()->text); + $this->assertEquals('uploader', + $mediaGroup->getMediaCredit()->role); + $this->assertEquals('urn:youtube', + $mediaGroup->getMediaCredit()->scheme); + $this->assertEquals('partner', + $mediaGroup->getMediaCredit()->getYTtype()); + $players = $mediaGroup->getPlayer(); + $this->assertEquals('http://www.youtube.com/watch?v=Lur391T5ApY', + $players[0]->url); + + $this->assertEquals(271, $playlistVideoEntry->statistics->viewCount); + $this->assertEquals(1, $playlistVideoEntry->rating->min); + $this->assertEquals(5, $playlistVideoEntry->rating->max); + $this->assertEquals(5, $playlistVideoEntry->rating->numRaters); + $this->assertEquals(4.20, $playlistVideoEntry->rating->average); + $this->assertEquals(1, $playlistVideoEntry->position->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/videos/Lur391T5ApY/comments?v=2', + $playlistVideoEntry->comments->feedLink->href); + $this->assertEquals(4, + $playlistVideoEntry->comments->feedLink->countHint); + $this->assertEquals('New York, NY', + $playlistVideoEntry->getLocation()->text); + $this->assertEquals('2008-12-16', + $playlistVideoEntry->getRecorded()->text); + $this->assertEquals('Lur391T5ApY', + $playlistVideoEntry->getVideoId()); + + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->V2entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->V2entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptyPlaylistVideoEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry(); + $newPlaylistVideoEntry->transferFromXML($entryXml); + $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML(); + $this->assertTrue($entryXml == $newPlaylistVideoEntryXml); + } + + public function testEmptyPlaylistVideoEntryToAndFromStringShouldMatchV2() { + $this->entry->setMajorProtocolVersion(2); + $entryXml = $this->entry->saveXML(); + $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry(); + $newPlaylistVideoEntry->setMajorProtocolVersion(2); + $newPlaylistVideoEntry->transferFromXML($entryXml); + $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML(); + $this->assertTrue($entryXml == $newPlaylistVideoEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->V2entryText); + $this->verifyAllSamplePropertiesAreCorrectV2($this->entry); + } + + public function testConvertPlaylistVideoEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry(); + $newPlaylistVideoEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newPlaylistVideoEntry); + $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML(); + $this->assertEquals($entryXml, $newPlaylistVideoEntryXml); + } + + public function testConvertPlaylistVideoEntryToAndFromStringV2() { + $this->entry->setMajorProtocolVersion(2); + $this->entry->transferFromXML($this->V2entryText); + $entryXml = $this->entry->saveXML(); + $newPlaylistVideoEntry = new Zend_Gdata_YouTube_PlaylistVideoEntry(); + $newPlaylistVideoEntry->setMajorProtocolVersion(2); + $newPlaylistVideoEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrectV2($newPlaylistVideoEntry); + $newPlaylistVideoEntryXml = $newPlaylistVideoEntry->saveXML(); + $this->assertEquals($entryXml, $newPlaylistVideoEntryXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php b/zend/tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php new file mode 100644 index 0000000..d145656 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/PlaylistVideoFeedTest.php @@ -0,0 +1,112 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml', + true); + $this->feed = new Zend_Gdata_YouTube_PlaylistVideoFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($playlistVideoFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7', + $playlistVideoFeed->id->text); + $this->assertEquals('2007-09-20T13:42:19.000-07:00', $playlistVideoFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $playlistVideoFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#playlist', $playlistVideoFeed->category[0]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/tags.cat', $playlistVideoFeed->category[1]->scheme); + $this->assertEquals('music', $playlistVideoFeed->category[1]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $playlistVideoFeed->logo->text); + $this->assertEquals('text', $playlistVideoFeed->title->type); + $this->assertEquals('YouTube Musicians', $playlistVideoFeed->title->text);; + $this->assertEquals('self', $playlistVideoFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $playlistVideoFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7?start-index=1&max-results=25', $playlistVideoFeed->getLink('self')->href); + $this->assertEquals('testuser', $playlistVideoFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $playlistVideoFeed->author[0]->uri->text); + $this->assertEquals(13, $playlistVideoFeed->totalResults->text); + $this->assertEquals(13, count($playlistVideoFeed->entry)); + $entries = $playlistVideoFeed->entry; + $this->assertEquals(1, $entries[0]->getPosition()->getText()); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testEmptyPlaylistVideoFeedToAndFromStringShouldMatch() { + $entryXml = $this->feed->saveXML(); + $newPlaylistVideoFeed = new Zend_Gdata_YouTube_PlaylistVideoFeed(); + $newPlaylistVideoFeed->transferFromXML($entryXml); + $newPlaylistVideoFeedXml = $newPlaylistVideoFeed->saveXML(); + $this->assertTrue($entryXml == $newPlaylistVideoFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testConvertPlaylistVideoFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $feedXml = $this->feed->saveXML(); + $newPlaylistVideoFeed = new Zend_Gdata_YouTube_PlaylistVideoFeed(); + $newPlaylistVideoFeed->transferFromXML($feedXml); + $this->verifyAllSamplePropertiesAreCorrect($newPlaylistVideoFeed); + $newPlaylistVideoFeedXml = $newPlaylistVideoFeed->saveXML(); + $this->assertEquals($feedXml, $newPlaylistVideoFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php b/zend/tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php new file mode 100644 index 0000000..a6e065b --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/SubscriptionEntryTest.php @@ -0,0 +1,332 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml', + true); + $this->v2entryText_channel = file_get_contents( + 'Zend/Gdata/YouTube/_files/' . + 'SubscriptionEntryDataSample_channelV2.xml', + true); + $this->v2entryText_playlist = file_get_contents( + 'Zend/Gdata/YouTube/_files/' . + 'SubscriptionEntryDataSample_playlistV2.xml', + true); + $this->v2entryText_favorites = file_get_contents( + 'Zend/Gdata/YouTube/_files/' . + 'SubscriptionEntryDataSample_favoritesV2.xml', + true); + $this->v2entryText_query = file_get_contents( + 'Zend/Gdata/YouTube/_files/' . + 'SubscriptionEntryDataSample_queryV2.xml', + true); + + $this->entry = new Zend_Gdata_YouTube_SubscriptionEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($subscriptionListEntry) { + $this->assertEquals( + 'http://gdata.youtube.com/feeds/users/testuser/' . + 'subscriptions/35bbde297dba88db', + $subscriptionListEntry->id->text); + $this->assertEquals('2007-03-02T11:58:22.000-08:00', + $subscriptionListEntry->updated->text); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat', + $subscriptionListEntry->category[1]->scheme); + $this->assertEquals('publisher', + $subscriptionListEntry->category[1]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $subscriptionListEntry->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#subscription', + $subscriptionListEntry->category[0]->term); + $this->assertEquals('text', $subscriptionListEntry->title->type); + $this->assertEquals('Videos published by : BBC', + $subscriptionListEntry->title->text);; + $this->assertEquals('self', + $subscriptionListEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $subscriptionListEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/users/testuser/' . + 'subscriptions/35bbde297dba88db', + $subscriptionListEntry->getLink('self')->href); + $this->assertEquals('testuser', + $subscriptionListEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', + $subscriptionListEntry->author[0]->uri->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/BBC/uploads', + $subscriptionListEntry->feedLink[0]->href); + $this->assertEquals('697', + $subscriptionListEntry->feedLink[0]->countHint); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#user.uploads', + $subscriptionListEntry->feedLink[0]->rel); + } + + public function verifyAllSamplePropertiesAreCorrectV2( + $subscriptionListEntry) { + $this->assertEquals( + 'tag:youtube.com,2008:user:googledevelopers:subscription:' . + 'Z1Lm-S9gkRQ', + $subscriptionListEntry->id->text); + $this->assertEquals('2007-11-16T15:15:17.000-08:00', + $subscriptionListEntry->published->text); + $this->assertEquals('2007-11-16T15:15:17.000-08:00', + $subscriptionListEntry->updated->text); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat', + $subscriptionListEntry->category[0]->scheme); + $this->assertEquals('channel', + $subscriptionListEntry->category[0]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $subscriptionListEntry->category[1]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#subscription', + $subscriptionListEntry->category[1]->term); + + $this->assertEquals('self', + $subscriptionListEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $subscriptionListEntry->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/googledevelopers/' . + 'subscriptions/Z1Lm-S9gkRQ?v=2', + $subscriptionListEntry->getLink('self')->href); + $this->assertEquals('related', + $subscriptionListEntry->getLink('related')->rel); + $this->assertEquals('application/atom+xml', + $subscriptionListEntry->getLink('related')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/googledevelopers?v=2', + $subscriptionListEntry->getLink('related')->href); + $this->assertEquals('alternate', + $subscriptionListEntry->getLink('alternate')->rel); + $this->assertEquals('text/html', + $subscriptionListEntry->getLink('alternate')->type); + $this->assertEquals( + 'http://www.youtube.com/profile_videos?user=androiddevelopers', + $subscriptionListEntry->getLink('alternate')->href); + $this->assertEquals('GoogleDevelopers', + $subscriptionListEntry->author[0]->name->text); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/googledevelopers', + $subscriptionListEntry->author[0]->uri->text); + $this->assertEquals('androiddevelopers', + $subscriptionListEntry->getUsername()->text); + $this->assertEquals('50', + $subscriptionListEntry->getCountHint()->text); + $thumbnail = $subscriptionListEntry->getMediaThumbnail(); + $this->assertTrue( + $thumbnail instanceof Zend_Gdata_Media_Extension_MediaThumbnail); + $this->assertTrue($thumbnail->getUrl() != null); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/' . + 'androiddevelopers/uploads?v=2', + $subscriptionListEntry->getContent()->getSrc()); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->transferFromXML($this->v2entryText_channel); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->transferFromXML($this->v2entryText_channel); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptySubscriptionEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry(); + $newSubscriptionEntry->transferFromXML($entryXml); + $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML(); + $this->assertTrue($entryXml == $newSubscriptionEntryXml); + } + + public function testEmptySubscriptionEntryToAndFromStringShouldMatchV2() { + $this->entry->transferFromXML($this->v2entryText_channel); + $entryXml = $this->entry->saveXML(); + $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry(); + $newSubscriptionEntry->transferFromXML($entryXml); + $newSubscriptionEntry->setMajorProtocolVersion(2); + $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML(); + $this->assertTrue($entryXml == $newSubscriptionEntryXml); + } + + public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals(2, count($this->entry->feedLink)); + } + + public function testGetFeedLinkCanReturnEntriesByRelValue() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals($entry1, $this->entry->getFeedLink('first')); + $this->assertEquals($entry2, $this->entry->getFeedLink('second')); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->entry->transferFromXML($this->v2entryText_channel); + $this->entry->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($this->entry); + } + + public function testConvertSubscriptionEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newSubscriptionEntry = new Zend_Gdata_YouTube_SubscriptionEntry(); + $newSubscriptionEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newSubscriptionEntry); + $newSubscriptionEntryXml = $newSubscriptionEntry->saveXML(); + $this->assertEquals($entryXml, $newSubscriptionEntryXml); + } + + public function testExceptionThrownInChannelSubscription() { + $this->entry->transferFromXML($this->entryText); + $exceptionCaught = false; + try { + $this->entry->getCountHint(); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Expected a VersionException on ' . + 'calling getCountHint() on a v1 subscription entry.'); + } + + public function testChannelSubscriptionFunctionalityV2() { + $this->entry->transferFromXML($this->v2entryText_channel); + $this->assertEquals('androiddevelopers', + $this->entry->getUsername()->text); + $categories = $this->entry->getCategory(); + foreach($categories as $category) { + if ($category->getScheme() == + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') { + $this->assertEquals('channel', $category->getTerm()); + } + } + } + + public function testPlaylistSubscriptionFunctionalityV2() { + $this->entry->transferFromXML($this->v2entryText_playlist); + $this->entry->setMajorProtocolVersion(2); + $this->assertEquals('From Google Engineers', + $this->entry->getPlaylistTitle()->text); + $this->assertEquals('4AE5C0D23C2EB82D', + $this->entry->getPlaylistId()->text); + $categories = $this->entry->getCategory(); + foreach($categories as $category) { + if ($category->getScheme() == + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') { + $this->assertEquals('playlist', $category->getTerm()); + } + } + } + + public function testFavoritesSubscriptionFunctionalityV2() { + $this->entry->transferFromXML($this->v2entryText_favorites); + $categories = $this->entry->getCategory(); + foreach($categories as $category) { + if ($category->getScheme() == + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') { + $this->assertEquals('favorites', $category->getTerm()); + } + } + } + + public function testQuerySubscriptionFunctionalityV2() { + $this->entry->transferFromXML($this->v2entryText_query); + $categories = $this->entry->getCategory(); + foreach($categories as $category) { + if ($category->getScheme() == + 'http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat') { + $this->assertEquals('query', $category->getTerm()); + } + } + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php b/zend/tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php new file mode 100644 index 0000000..c357721 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/SubscriptionFeedTest.php @@ -0,0 +1,178 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml', + true); + $this->V2feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml', + true); + $this->feed = new Zend_Gdata_YouTube_SubscriptionFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($subscriptionFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/subscriptions', + $subscriptionFeed->id->text); + $this->assertEquals('2007-09-20T22:12:45.193Z', $subscriptionFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $subscriptionFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#subscription', $subscriptionFeed->category[0]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $subscriptionFeed->logo->text); + $this->assertEquals('text', $subscriptionFeed->title->type); + $this->assertEquals('testuser\'s Subscriptions', $subscriptionFeed->title->text);; + $this->assertEquals('self', $subscriptionFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $subscriptionFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser/subscriptions?start-index=1&max-results=25', $subscriptionFeed->getLink('self')->href); + $this->assertEquals('testuser', $subscriptionFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/testuser', $subscriptionFeed->author[0]->uri->text); + $this->assertEquals(3, $subscriptionFeed->totalResults->text); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($subscriptionFeed) { + $this->assertEquals('tag:youtube.com,2008:user:zfgdata:subscriptions', + $subscriptionFeed->id->text); + $this->assertEquals('2007-09-20T21:01:13.000-07:00', + $subscriptionFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', + $subscriptionFeed->category[0]->scheme); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007#subscription', + $subscriptionFeed->category[0]->term); + $this->assertEquals( + 'http://www.youtube.com/img/pic_youtubelogo_123x63.gif', + $subscriptionFeed->logo->text); + $this->assertEquals('Subscriptions of zfgdata', + $subscriptionFeed->title->text);; + $this->assertEquals('zfgdata', + $subscriptionFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/zfgdata', + $subscriptionFeed->author[0]->uri->text); + // fail because of opensearch issue TODO jhartman -> fix once trevor commits his fix + //$this->assertEquals(3, $subscriptionFeed->totalResults->text); + + $this->assertEquals('self', $subscriptionFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', + $subscriptionFeed->getLink('self')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/zfgdata/subscriptions' . + '?start-index=1&max-results=25&v=2', + $subscriptionFeed->getLink('self')->href); + $this->assertEquals('related', $subscriptionFeed->getLink('related')->rel); + $this->assertEquals('application/atom+xml', + $subscriptionFeed->getLink('related')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/zfgdata?v=2', + $subscriptionFeed->getLink('related')->href); + $this->assertEquals('alternate', $subscriptionFeed->getLink('alternate')->rel); + $this->assertEquals('text/html', + $subscriptionFeed->getLink('alternate')->type); + $this->assertEquals( + 'http://www.youtube.com/profile_subscriptions?user=zfgdata', + $subscriptionFeed->getLink('alternate')->href); + $this->assertEquals('service', $subscriptionFeed->getLink('service')->rel); + $this->assertEquals('application/atomsvc+xml', + $subscriptionFeed->getLink('service')->type); + $this->assertEquals( + 'http://gdata.youtube.com/feeds/api/users/zfgdata/subscriptions?' . + 'alt=atom-service&v=2', + $subscriptionFeed->getLink('service')->href); + + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertEquals(0, count($this->feed->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertEquals(0, count($this->feed->extensionAttributes)); + } + + public function testEmptySubscriptionFeedToAndFromStringShouldMatch() { + $feedXml = $this->feed->saveXML(); + $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed(); + $newSubscriptionFeed->transferFromXML($feedXml); + $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML(); + $this->assertTrue($feedXml == $newSubscriptionFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->feed->transferFromXML($this->V2feedText); + $this->verifyAllSamplePropertiesAreCorrectV2($this->feed); + } + + public function testConvertSubscriptionFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $feedXml = $this->feed->saveXML(); + $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed(); + $newSubscriptionFeed->transferFromXML($feedXml); + $this->verifyAllSamplePropertiesAreCorrect($newSubscriptionFeed); + $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML(); + $this->assertEquals($feedXml, $newSubscriptionFeedXml); + } + + public function testConvertSubscriptionFeedToAndFromStringV2() { + $this->feed->transferFromXML($this->V2feedText); + $this->feed->setMajorProtocolVersion(2); + $feedXml = $this->feed->saveXML(); + $newSubscriptionFeed = new Zend_Gdata_YouTube_SubscriptionFeed(); + $newSubscriptionFeed->transferFromXML($feedXml); + $newSubscriptionFeed->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($newSubscriptionFeed); + $newSubscriptionFeedXml = $newSubscriptionFeed->saveXML(); + $this->assertEquals($feedXml, $newSubscriptionFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/UserProfileEntryTest.php b/zend/tests/Zend/Gdata/YouTube/UserProfileEntryTest.php new file mode 100644 index 0000000..645b125 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/UserProfileEntryTest.php @@ -0,0 +1,253 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml', + true); + $this->V2entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml', + true); + $this->entry = new Zend_Gdata_YouTube_UserProfileEntry(); + } + + private function verifyAllSamplePropertiesAreCorrect ($userProfileEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy', + $userProfileEntry->id->text); + $this->assertEquals('2007-08-13T12:37:03.000-07:00', $userProfileEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $userProfileEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#userProfile', $userProfileEntry->category[0]->term); + $this->assertEquals('text', $userProfileEntry->title->type); + $this->assertEquals('Darcy', $userProfileEntry->title->text);; + $this->assertEquals('self', $userProfileEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $userProfileEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy', $userProfileEntry->getLink('self')->href); + $this->assertEquals('Fitzwilliam Darcy', $userProfileEntry->author[0]->name->text); + $this->assertEquals(32, $userProfileEntry->age->text); + $this->assertEquals('darcy', $userProfileEntry->username->text); + $this->assertEquals('A person of great interest', $userProfileEntry->description->text); + $this->assertEquals('Pride and Prejudice', $userProfileEntry->books->text); + $this->assertEquals('Self employed', $userProfileEntry->company->text); + $this->assertEquals('Reading, arguing with Liz', $userProfileEntry->hobbies->text); + $this->assertEquals('Steventon', $userProfileEntry->hometown->text); + $this->assertEquals('Longbourn in Hertfordshire, Pemberley in Derbyshire', $userProfileEntry->location->text); + $this->assertEquals('Pride and Prejudice, 2005', $userProfileEntry->movies->text); + $this->assertEquals('Air Con Varizzioni, The Pleasure of the Town', $userProfileEntry->music->text); + $this->assertEquals('Gentleman', $userProfileEntry->occupation->text); + $this->assertEquals('Home schooling', $userProfileEntry->school->text); + $this->assertEquals('m', $userProfileEntry->gender->text); + $this->assertEquals('taken', $userProfileEntry->relationship->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy', $userProfileEntry->author[0]->uri->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/favorites', $userProfileEntry->feedLink[0]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.favorites', $userProfileEntry->feedLink[0]->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/contacts', $userProfileEntry->feedLink[1]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.contacts', $userProfileEntry->feedLink[1]->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/inbox', $userProfileEntry->feedLink[2]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.inbox', $userProfileEntry->feedLink[2]->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/playlists', $userProfileEntry->feedLink[3]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.playlists', $userProfileEntry->feedLink[3]->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/subscriptions', $userProfileEntry->feedLink[4]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.subscriptions', $userProfileEntry->feedLink[4]->rel); + $this->assertEquals('http://gdata.youtube.com/feeds/users/darcy/uploads', $userProfileEntry->feedLink[5]->href); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#user.uploads', $userProfileEntry->feedLink[5]->rel); + } + + private function verifyAllSamplePropertiesAreCorrectV2 ($userProfileEntry) { + $this->assertEquals('tag:youtube.com,2008:user:zfgdata', + $userProfileEntry->id->text); + $this->assertEquals('2008-12-15T13:30:56.000-08:00', + $userProfileEntry->updated->text); + $this->assertEquals( + 'http://gdata.youtube.com/schemas/2007/channeltypes.cat', + $userProfileEntry->category[0]->scheme); + $this->assertEquals( + 'Standard', + $userProfileEntry->category[0]->term); + $this->assertEquals('zfgdata Channel', + $userProfileEntry->title->text);; + $this->assertEquals('self', $userProfileEntry->getLink('self')->rel); + $this->assertEquals("I'm a lonely test account, with little to do " . + "but sit\naround and wait for people to use me. I get bored in " . + "between\nreleases and often sleep to pass the time. Please use " . + "me more\noften, as I love to show off my talent in breaking " . + "your\ncode.", $userProfileEntry->getAboutMe()->text); + $this->assertEquals('88', + $userProfileEntry->getStatistics()->getViewCount()); + $thumbnail = $userProfileEntry->getThumbnail(); + $this->assertTrue( + $thumbnail instanceof Zend_Gdata_Media_Extension_MediaThumbnail); + $this->assertTrue($thumbnail->getUrl() != null); + $this->assertEquals('TestAccount', + $userProfileEntry->getLastName()->text); + $this->assertEquals('Lonely', + $userProfileEntry->getFirstName()->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->transferFromXML($this->V2entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertEquals(0, count($this->entry->extensionElements)); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->transferFromXML($this->V2entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertEquals(0, count($this->entry->extensionAttributes)); + } + + public function testEmptyUserProfileEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry(); + $newUserProfileEntry->transferFromXML($entryXml); + $newUserProfileEntryXml = $newUserProfileEntry->saveXML(); + $this->assertTrue($entryXml == $newUserProfileEntryXml); + } + + public function testEmptyUserProfileEntryToAndFromStringShouldMatchV2() { + $this->entry->setMajorProtocolVersion(2); + $entryXml = $this->entry->saveXML(); + $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry(); + $newUserProfileEntry->setMajorProtocolVersion(2); + $newUserProfileEntry->transferFromXML($entryXml); + $newUserProfileEntryXml = $newUserProfileEntry->saveXML(); + $this->assertTrue($entryXml == $newUserProfileEntryXml); + } + + public function testGetFeedLinkReturnsAllStoredEntriesWhenUsedWithNoParameters() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals(2, count($this->entry->feedLink)); + } + + public function testGetFeedLinkCanReturnEntriesByRelValue() { + // Prepare test data + $entry1 = new Zend_Gdata_Extension_FeedLink(); + $entry1->rel = "first"; + $entry1->href= "foo"; + $entry2 = new Zend_Gdata_Extension_FeedLink(); + $entry2->rel = "second"; + $entry2->href= "bar"; + $data = array($entry1, $entry2); + + // Load test data and run test + $this->entry->feedLink = $data; + $this->assertEquals($entry1, $this->entry->getFeedLink('first')); + $this->assertEquals($entry2, $this->entry->getFeedLink('second')); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testSamplePropertiesAreCorrectV2 () { + $this->entry->transferFromXML($this->V2entryText); + $this->entry->setMajorProtocolVersion(2); + $this->verifyAllSamplePropertiesAreCorrectV2($this->entry); + } + + public function testConvertUserProfileEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry(); + $newUserProfileEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newUserProfileEntry); + $newUserProfileEntryXml = $newUserProfileEntry->saveXML(); + $this->assertEquals($entryXml, $newUserProfileEntryXml); + } + + public function testConvertUserProfileEntryToAndFromStringV2() { + $this->entry->transferFromXML($this->V2entryText); + $entryXml = $this->entry->saveXML(); + $newUserProfileEntry = new Zend_Gdata_YouTube_UserProfileEntry(); + $newUserProfileEntry->setMajorProtocolVersion(2); + $newUserProfileEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrectV2($newUserProfileEntry); + $newUserProfileEntryXml = $newUserProfileEntry->saveXML(); + $this->assertEquals($entryXml, $newUserProfileEntryXml); + } + + public function testYTStatisticsInUserProfileEntryV2() { + $this->entry->transferFromXML($this->V2entryText); + $this->entry->setMajorProtocolVersion(2); + $statistics = $this->entry->getStatistics(); + $this->assertEquals(14, $statistics->getVideoWatchCount()); + $this->assertEquals(88, $statistics->getViewCount()); + $this->assertEquals(12, $statistics->getSubscriberCount()); + $this->assertEquals('2008-12-15T14:56:57.000-08:00', + $statistics->getLastWebAccess()); + + // test __toString() + $this->assertEquals('View Count=88 VideoWatchCount=14 ' . + 'SubscriberCount=12 LastWebAccess=2008-12-15T14:56:57.000-08:00 ' . + 'FavoriteCount=', + sprintf("%s", $statistics)); + + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/VideoEntryTest.php b/zend/tests/Zend/Gdata/YouTube/VideoEntryTest.php new file mode 100644 index 0000000..132bc29 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/VideoEntryTest.php @@ -0,0 +1,767 @@ +entryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml', + true); + $this->privateEntryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml', + true); + $this->v2EntryText = file_get_contents( + 'Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml', + true); + $this->entry = new Zend_Gdata_YouTube_VideoEntry(); + } + + private function createRandomString() { + $randomString = ''; + for ($x = 0; $x < 10; $x++) { + $randomCharacter = chr(rand(97,122)); + $randomString .= $randomCharacter; + } + return $randomString; + } + + private function verifyAllSamplePropertiesAreCorrect ($videoEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', + $videoEntry->id->text); + $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId()); + $this->assertEquals('2007-01-07T01:50:15.000Z', $videoEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[0]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme); + $this->assertEquals('barkley', $videoEntry->category[1]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme); + $this->assertEquals('singing', $videoEntry->category[2]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[3]->scheme); + $this->assertEquals('acoustic', $videoEntry->category[3]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme); + $this->assertEquals('cover', $videoEntry->category[4]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[5]->scheme); + $this->assertEquals('Music', $videoEntry->category[5]->term); + $this->assertEquals('Music', $videoEntry->category[5]->label); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme); + $this->assertEquals('gnarls', $videoEntry->category[6]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[7]->scheme); + $this->assertEquals('music', $videoEntry->category[7]->term); + + $this->assertEquals('text', $videoEntry->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);; + $this->assertEquals('html', $videoEntry->content->type); + $this->assertEquals('self', $videoEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', $videoEntry->getLink('self')->href); + $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/responses', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/related', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href); + $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoEntry->author[0]->uri->text); + $mediaGroup = $videoEntry->mediaGroup; + + $this->assertEquals('plain', $mediaGroup->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text); + $this->assertEquals('plain', $mediaGroup->description->type); + $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text); + $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text); + $this->assertEquals(255, $mediaGroup->duration->seconds); + $this->assertEquals('Music', $mediaGroup->category[0]->label); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[1]->scheme); + $this->assertEquals('DeveloperTag1', $mediaGroup->category[1]->text); + $this->assertEquals('video', $mediaGroup->content[0]->medium); + $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url); + $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type); + $this->assertEquals('true', $mediaGroup->content[0]->isDefault); + $this->assertEquals('full', $mediaGroup->content[0]->expression); + $this->assertEquals(255, $mediaGroup->content[0]->duration); + $this->assertEquals(5, $mediaGroup->content[0]->format); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url); + + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[0]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[0]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[1]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[1]->width); + $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[2]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[2]->width); + $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url); + $this->assertEquals(240, $mediaGroup->thumbnail[3]->height); + $this->assertEquals(320, $mediaGroup->thumbnail[3]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time); + $this->assertNull($mediaGroup->private); + + $this->assertEquals(113321, $videoEntry->statistics->viewCount); + $this->assertEquals(1, $videoEntry->rating->min); + $this->assertEquals(5, $videoEntry->rating->max); + $this->assertEquals(1005, $videoEntry->rating->numRaters); + $this->assertEquals(4.77, $videoEntry->rating->average); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $videoEntry->comments->feedLink->href); + + $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text); + $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded()); + } + + private function verifyAllPrivateSamplePropertiesAreCorrect ($videoEntry) { + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', + $videoEntry->id->text); + $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId()); + $this->assertEquals('2007-01-07T01:50:15.000Z', $videoEntry->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[0]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme); + $this->assertEquals('barkley', $videoEntry->category[1]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme); + $this->assertEquals('singing', $videoEntry->category[2]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[3]->scheme); + $this->assertEquals('acoustic', $videoEntry->category[3]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme); + $this->assertEquals('cover', $videoEntry->category[4]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[5]->scheme); + $this->assertEquals('Music', $videoEntry->category[5]->term); + $this->assertEquals('Music', $videoEntry->category[5]->label); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme); + $this->assertEquals('gnarls', $videoEntry->category[6]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[7]->scheme); + $this->assertEquals('music', $videoEntry->category[7]->term); + + $this->assertEquals('text', $videoEntry->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);; + $this->assertEquals('html', $videoEntry->content->type); + $this->assertEquals('self', $videoEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E', $videoEntry->getLink('self')->href); + $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/responses', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/related', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href); + $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoEntry->author[0]->uri->text); + $mediaGroup = $videoEntry->mediaGroup; + + $this->assertEquals('plain', $mediaGroup->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text); + $this->assertEquals('plain', $mediaGroup->description->type); + $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text); + $this->assertEquals('music, singing, gnarls, barkley, acoustic, cover', $mediaGroup->keywords->text); + $this->assertEquals(255, $mediaGroup->duration->seconds); + + $this->assertEquals('Music', $mediaGroup->category[0]->label); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[1]->scheme); + $this->assertEquals('DeveloperTag1', $mediaGroup->category[1]->text); + $this->assertEquals('video', $mediaGroup->content[0]->medium); + $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $mediaGroup->content[0]->url); + $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type); + $this->assertEquals('true', $mediaGroup->content[0]->isDefault); + $this->assertEquals('full', $mediaGroup->content[0]->expression); + $this->assertEquals(255, $mediaGroup->content[0]->duration); + $this->assertEquals(5, $mediaGroup->content[0]->format); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url); + + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[0]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[0]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[1]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[1]->width); + $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[2]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[2]->width); + $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time); + $this->assertEquals('http://img.youtube.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url); + $this->assertEquals(240, $mediaGroup->thumbnail[3]->height); + $this->assertEquals(320, $mediaGroup->thumbnail[3]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time); + $this->assertTrue($mediaGroup->private instanceof Zend_Gdata_YouTube_Extension_Private); + + $this->assertEquals(113321, $videoEntry->statistics->viewCount); + $this->assertEquals(1, $videoEntry->rating->min); + $this->assertEquals(5, $videoEntry->rating->max); + $this->assertEquals(1005, $videoEntry->rating->numRaters); + $this->assertEquals(4.77, $videoEntry->rating->average); + $this->assertEquals('http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments', $videoEntry->comments->feedLink->href); + + $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text); + $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded()); + } + + public function verifyAllV2SamplePropertiesAreCorrect($videoEntry) { + $this->assertEquals('tag:youtube.com,2008:video:UMFI1hdm96E', + $videoEntry->id->text); + $this->assertEquals('UMFI1hdm96E', $videoEntry->getVideoId()); + $this->assertEquals('2008-12-08T04:04:33.000Z', $videoEntry->updated->text); + + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[0]->scheme); + $this->assertEquals('cover', $videoEntry->category[0]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[1]->scheme); + $this->assertEquals('acoustic', $videoEntry->category[1]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[2]->scheme); + $this->assertEquals('gnarls', $videoEntry->category[2]->term); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoEntry->category[3]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoEntry->category[3]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[4]->scheme); + $this->assertEquals('barkley', $videoEntry->category[4]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[5]->scheme); + $this->assertEquals('music', $videoEntry->category[5]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/keywords.cat', $videoEntry->category[6]->scheme); + $this->assertEquals('singing', $videoEntry->category[6]->term); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $videoEntry->category[7]->scheme); + $this->assertEquals('Music', $videoEntry->category[7]->term); + + $this->assertEquals('text', $videoEntry->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->title->text);; + $this->assertEquals('application/x-shockwave-flash', $videoEntry->content->type); + $this->assertEquals('self', $videoEntry->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E?v=2', $videoEntry->getLink('self')->href); + $this->assertEquals('text/html', $videoEntry->getLink('alternate')->type); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getLink('alternate')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/responses?v=2', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.responses')->href); + $this->assertEquals('application/atom+xml', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/related?v=2', $videoEntry->getLink('http://gdata.youtube.com/schemas/2007#video.related')->href); + $this->assertEquals('davidchoimusic', $videoEntry->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/api/users/davidchoimusic', $videoEntry->author[0]->uri->text); + + $mediaGroup = $videoEntry->mediaGroup; + + $this->assertEquals('UMFI1hdm96E', $mediaGroup->getVideoId()->text); + $this->assertEquals('plain', $mediaGroup->title->type); + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $mediaGroup->title->text); + $this->assertEquals('plain', $mediaGroup->description->type); + $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $mediaGroup->description->text); + $this->assertEquals('acoustic, barkley, cover, gnarls, music, singing', $mediaGroup->keywords->text); + $this->assertEquals(255, $mediaGroup->duration->seconds); + + $this->assertEquals('http://gdata.youtube.com/schemas/2007/developertags.cat', $mediaGroup->category[0]->scheme); + $this->assertEquals('DeveloperTag1', $mediaGroup->category[0]->text); + $this->assertEquals('http://gdata.youtube.com/schemas/2007/categories.cat', $mediaGroup->category[1]->scheme); + $this->assertEquals('Music', $mediaGroup->category[1]->text); + $this->assertEquals('video', $mediaGroup->content[0]->medium); + $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E&f=gdata_videos', $mediaGroup->content[0]->url); + $this->assertEquals('application/x-shockwave-flash', $mediaGroup->content[0]->type); + $this->assertEquals('true', $mediaGroup->content[0]->isDefault); + $this->assertEquals('full', $mediaGroup->content[0]->expression); + $this->assertEquals(255, $mediaGroup->content[0]->duration); + $this->assertEquals(5, $mediaGroup->content[0]->format); + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $mediaGroup->player[0]->url); + + $this->assertEquals('HK,TW', $mediaGroup->getMediaRating()->getCountry()); + $this->assertEquals(1, $mediaGroup->getMediaRating()->text); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#mediarating', + $mediaGroup->getMediaRating()->getScheme()); + + $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/2.jpg', $mediaGroup->thumbnail[0]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[0]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[0]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[0]->time); + $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/1.jpg', $mediaGroup->thumbnail[1]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[1]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[1]->width); + $this->assertEquals('00:01:03.750', $mediaGroup->thumbnail[1]->time); + $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/3.jpg', $mediaGroup->thumbnail[2]->url); + $this->assertEquals(97, $mediaGroup->thumbnail[2]->height); + $this->assertEquals(130, $mediaGroup->thumbnail[2]->width); + $this->assertEquals('00:03:11.250', $mediaGroup->thumbnail[2]->time); + $this->assertEquals('http://i.ytimg.com/vi/UMFI1hdm96E/0.jpg', $mediaGroup->thumbnail[3]->url); + $this->assertEquals(240, $mediaGroup->thumbnail[3]->height); + $this->assertEquals(320, $mediaGroup->thumbnail[3]->width); + $this->assertEquals('00:02:07.500', $mediaGroup->thumbnail[3]->time); + + $this->assertEquals(267971, $videoEntry->statistics->viewCount); + $this->assertEquals(1, $videoEntry->rating->min); + $this->assertEquals(5, $videoEntry->rating->max); + $this->assertEquals(2062, $videoEntry->rating->numRaters); + $this->assertEquals(4.74, $videoEntry->rating->average); + $this->assertEquals('http://gdata.youtube.com/feeds/api/videos/UMFI1hdm96E/comments?v=2', $videoEntry->comments->feedLink->href); + + $this->assertEquals('37.398529052734375 -122.0635986328125', $videoEntry->where->point->pos->text); + $this->assertEquals('2008-09-25', $videoEntry->getVideoRecorded()); + + + + } + + public function testGetVideoId() { + $videoEntry = new Zend_Gdata_YouTube_VideoEntry(); + + // assert valid ID + $videoEntry->id = new Zend_Gdata_App_Extension_Id('http://gdata.youtube.com/feeds/videos/ABCDEFG12AB'); + $this->assertEquals('ABCDEFG12AB', $videoEntry->getVideoId()); + } + + public function testGetVideoIdV2() { + $v2VideoEntry = new Zend_Gdata_YouTube_VideoEntry(); + $v2VideoEntry->setMajorProtocolVersion(2); + + $v2MediaGroup = new Zend_Gdata_YouTube_Extension_MediaGroup(); + $v2MediaGroup->setVideoId( + new Zend_Gdata_YouTube_Extension_VideoId('UMFI1hdm96E')); + + $v2VideoEntry->setMediaGroup($v2MediaGroup); + + $this->assertEquals('UMFI1hdm96E', $v2VideoEntry->getVideoId()); + } + + public function testGetVideoIdException() { + + $exceptionCaught = false; + $videoEntry = new Zend_Gdata_YouTube_VideoEntry(); + + // use invalid ID + $videoEntry->id = new Zend_Gdata_App_Extension_Id('adfadfasf'); + + try { + $videoEntry->getVideoId(); + + } catch (Zend_Gdata_App_Exception $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' . + 'Zend_Gdata_AppException'); + } + + public function testGetVersionExceptionOnGetRacy() { + $videoEntry = new Zend_Gdata_YouTube_VideoEntry(); + $videoEntry->setMajorProtocolVersion(2); + + $exceptionCaught = false; + + try { + $videoEntry->getRacy(); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' . + 'Zend_Gdata_App_VersionException'); + } + + public function testGetVersionExceptionOnSetRacy() { + $videoEntry = new Zend_Gdata_YouTube_VideoEntry(); + $videoEntry->setMajorProtocolVersion(2); + + $exceptionCaught = false; + + try { + $videoEntry->getRacy(); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' . + 'Zend_Gdata_App_VersionException'); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->entry->transferFromXML($this->entryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElementsV2() { + $this->entry->transferFromXML($this->v2EntryText); + $this->assertTrue(is_array($this->entry->extensionElements)); + $this->assertTrue(count($this->entry->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributesV2() { + $this->entry->transferFromXML($this->v2EntryText); + $this->assertTrue(is_array($this->entry->extensionAttributes)); + $this->assertTrue(count($this->entry->extensionAttributes) == 0); + } + + public function testEmptyVideoEntryToAndFromStringShouldMatch() { + $entryXml = $this->entry->saveXML(); + $newVideoEntry = new Zend_Gdata_YouTube_VideoEntry(); + $newVideoEntry->transferFromXML($entryXml); + $newVideoEntryXml = $newVideoEntry->saveXML(); + $this->assertTrue($entryXml == $newVideoEntryXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->entryText); + $this->verifyAllSamplePropertiesAreCorrect($this->entry); + } + + public function testPrivateSamplePropertiesAreCorrect () { + $this->entry->transferFromXML($this->privateEntryText); + $this->verifyAllPrivateSamplePropertiesAreCorrect($this->entry); + } + + public function testV2SamplePropertiesAreCorrect() { + $this->entry->transferFromXML($this->v2EntryText); + $this->entry->setMajorProtocolVersion(2); + $this->verifyAllV2SamplePropertiesAreCorrect($this->entry); + } + + public function testGetVideoTitle() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals('"Crazy (Gnarles Barkley)" - Acoustic Cover', $videoEntry->getVideoTitle()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoTitle()); + } + + public function testSetVideoTitle() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $newTitle = 'My New Title'; + $videoEntry->setVideoTitle($newTitle); + $this->assertEquals($videoEntry->getVideoTitle(), $newTitle); + } + + public function testGetVideoDescription() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals('Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic', $videoEntry->getVideoDescription()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoDescription()); + } + + public function testSetVideoDescription() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $newDescription = 'My New Description'; + $videoEntry->setVideoDescription($newDescription); + $this->assertEquals($videoEntry->getVideoDescription(), $newDescription); + } + + public function testGetVideoWatchPageUrl() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals('http://www.youtube.com/watch?v=UMFI1hdm96E', $videoEntry->getVideoWatchPageUrl()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoWatchPageUrl()); + } + + public function testGetVideoThumbnails() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $mediaThumbnails1 = $videoEntry->getMediaGroup()->getThumbnail(); + $mediaThumbnails2 = $videoEntry->getVideoThumbnails(); + + $this->assertEquals(count($mediaThumbnails1), count($mediaThumbnails2)); + + $foundThumbnail = false; + foreach ($mediaThumbnails2 as $thumbnail) { + if ($thumbnail['url'] == 'http://img.youtube.com/vi/UMFI1hdm96E/1.jpg') { + $foundThumbnail = true; + $this->assertEquals(97, $thumbnail['height']); + $this->assertEquals(130, $thumbnail['width']); + $this->assertEquals('00:01:03.750', $thumbnail['time']); + } + } + $this->assertTrue($foundThumbnail); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(array(), $newEntry->getVideoThumbnails()); + } + + public function testGetVideoTags() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $keywords = $videoEntry->getMediaGroup()->getKeywords(); + + $keywordsString = (string) $keywords; + + if (strlen(trim($keywordsString)) > 0) { + $keywordArray = preg_split('/(, *)|,/', $keywordsString); + } + + $tagArray = $videoEntry->getVideoTags(); + $this->assertEquals(count($keywordArray), count($tagArray)); + foreach ($keywordArray as $keyword) { + $this->assertTrue(in_array($keyword, $tagArray)); + } + foreach ($tagArray as $tag) { + $this->assertTrue(in_array($tag, $keywordArray)); + } + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(array(), $newEntry->getVideoTags()); + } + + public function testSetVideoTags() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $newKeywordsString = $this->createRandomString() + . ', ' . $this->createRandomString(); + $videoEntry->setVideoTags($newKeywordsString); + + if (strlen(trim($newKeywordsString)) > 0) { + $keywordArray = preg_split('/(, *)|,/', $newKeywordsString); + } + + $tagArray = $videoEntry->getVideoTags(); + $this->assertEquals(count($keywordArray), count($tagArray)); + + foreach ($keywordArray as $keyword) { + $this->assertTrue(in_array($keyword, $tagArray)); + } + + foreach ($tagArray as $tag) { + $this->assertTrue(in_array($tag, $keywordArray)); + } + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(array(), $newEntry->getVideoTags()); + } + + public function testGetVideoDeveloperTags() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $categories = $videoEntry->getMediaGroup()->getCategory(); + $developerTagsArrayFromMediaGroup = null; + foreach($categories as $category) { + if ($category->getScheme() == 'http://gdata.youtube.com/schemas/2007/developertags.cat') { + $developerTagsArrayFromMediaGroup[] = $category->getText(); + } + } + + $developerTagsArray = $videoEntry->getVideoDeveloperTags(); + + $this->assertEquals(count($developerTagsArrayFromMediaGroup), count($developerTagsArray)); + foreach ($developerTagsArrayFromMediaGroup as $devTagMG) { + $this->assertTrue(in_array($devTagMG, $developerTagsArrayFromMediaGroup)); + } + foreach ($developerTagsArray as $devTag) { + $this->assertTrue(in_array($devTag, $developerTagsArray)); + } + } + + public function testSetVideoDeveloperTags() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $existingDevTags = $videoEntry->getVideoDeveloperTags(); + + $newDeveloperTags = array( + $this->createRandomString(), + $this->createRandomString()); + + $videoEntry->setVideoDeveloperTags($newDeveloperTags); + $newAndOldDeveloperTags = array_merge($newDeveloperTags, $existingDevTags); + $developerTagsArray = $videoEntry->getVideoDeveloperTags(); + $this->assertEquals(count($newAndOldDeveloperTags), count($developerTagsArray)); + + foreach($developerTagsArray as $developerTagOnEntry) { + $this->assertTrue(in_array($developerTagOnEntry, $newAndOldDeveloperTags)); + } + } + + public function testGetFlashPlayerUrl() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals('http://www.youtube.com/v/UMFI1hdm96E', $videoEntry->getFlashPlayerUrl()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getFlashPlayerUrl()); + } + + public function testGetVideoDuration() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals(255, $videoEntry->getVideoDuration()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoDuration()); + } + + public function testGetVideoViewCount() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals(113321, $videoEntry->getVideoViewCount()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoViewCount()); + } + + public function testGetVideoGeoLocation() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $geoLocation = $videoEntry->getVideoGeoLocation(); + $this->assertEquals('37.398529052734375', $geoLocation['latitude']); + $this->assertEquals('-122.0635986328125', $geoLocation['longitude']); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoGeoLocation()); + } + + public function testGetVideoRatingInfo() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $ratingInfo = $videoEntry->getVideoRatingInfo(); + + $this->assertEquals(4.77, $ratingInfo['average']); + $this->assertEquals(1005, $ratingInfo['numRaters']); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoRatingInfo()); + } + + public function testGetVideoCategory() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertEquals('Music', $videoEntry->getVideoCategory()); + + $newEntry = new Zend_Gdata_YouTube_VideoEntry(); + $this->assertEquals(null, $newEntry->getVideoCategory()); + } + + public function testSetVideoCategory() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $newCategory = 'Comedy'; + $videoEntry->setVideoCategory($newCategory); + $this->assertEquals($videoEntry->getVideoCategory(), $newCategory); + } + + public function testConvertVideoEntryToAndFromString() { + $this->entry->transferFromXML($this->entryText); + $entryXml = $this->entry->saveXML(); + $newVideoEntry = new Zend_Gdata_YouTube_VideoEntry(); + $newVideoEntry->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newVideoEntry); + $newVideoEntryXml = $newVideoEntry->saveXML(); + $this->assertEquals($entryXml, $newVideoEntryXml); + } + + public function testNoEmbed() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + $this->assertNotEquals(null, $videoEntry->getNoEmbed()); + } + + public function testVideoState() { + $this->entry->transferFromXML($this->entryText); + $videoEntry = $this->entry; + + $videoState = $videoEntry->getVideoState(); + $this->assertTrue($videoState instanceof Zend_Gdata_YouTube_Extension_State); + + $this->assertEquals('rejected', $videoState->getName()); + $this->assertEquals('inappropriate', $videoState->getReasonCode()); + $this->assertEquals('http://www.youtube.com/t/community_guidelines', $videoState->getHelpUrl()); + $this->assertEquals('The content of this video may violate the terms of use.', + $videoState->getText()); + } + + public function testVideoPrivate() { + $this->entry->transferFromXml($this->privateEntryText); + $videoEntry = $this->entry; + + $this->assertTrue($videoEntry->isVideoPrivate()); + } + + public function testSetVideoPrivate() { + $this->entry->transferFromXml($this->entryText); + $videoEntry = $this->entry; + $videoEntry->setVideoPrivate(); + + $this->assertTrue($videoEntry->isVideoPrivate()); + } + + public function testSetVideoPublic() { + $this->entry->transferFromXml($this->privateEntryText); + $videoEntry = $this->entry; + $videoEntry->setVideoPublic(); + + $this->assertFalse($videoEntry->isVideoPrivate()); + } + + public function testRetrieveCommentsFeedUrl() { + $this->entry->transferFromXML($this->entryText); + $commentsFeedUrl = $this->entry->getVideoCommentFeedUrl(); + $this->assertEquals($commentsFeedUrl, + 'http://gdata.youtube.com/feeds/videos/UMFI1hdm96E/comments'); + } + + public function testAddVideoEntryRating() + { + $this->entry->transferFromXML($this->entryText); + $ratingValue = 2; + $entryWithRating = $this->entry->setVideoRating($ratingValue); + $this->assertTrue( + $entryWithRating instanceof Zend_Gdata_YouTube_VideoEntry); + + $rating = $entryWithRating->getRating(); + $this->assertTrue( + $rating instanceof Zend_Gdata_Extension_Rating); + + $this->assertEquals($rating->getValue(), $ratingValue); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/VideoFeedTest.php b/zend/tests/Zend/Gdata/YouTube/VideoFeedTest.php new file mode 100644 index 0000000..f7cea0c --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/VideoFeedTest.php @@ -0,0 +1,109 @@ +feedText = file_get_contents( + 'Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml', + true); + $this->feed = new Zend_Gdata_YouTube_VideoFeed(); + } + + private function verifyAllSamplePropertiesAreCorrect ($videoFeed) { + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/uploads', + $videoFeed->id->text); + $this->assertEquals('2007-09-21T02:27:22.638Z', $videoFeed->updated->text); + $this->assertEquals('http://schemas.google.com/g/2005#kind', $videoFeed->category[0]->scheme); + $this->assertEquals('http://gdata.youtube.com/schemas/2007#video', $videoFeed->category[0]->term); + $this->assertEquals('http://www.youtube.com/img/pic_youtubelogo_123x63.gif', $videoFeed->logo->text); + $this->assertEquals('text', $videoFeed->title->type); + $this->assertEquals('Davidchoimusic\'s Videos', $videoFeed->title->text);; + $this->assertEquals('self', $videoFeed->getLink('self')->rel); + $this->assertEquals('application/atom+xml', $videoFeed->getLink('self')->type); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic/uploads?start-index=1&max-results=5', $videoFeed->getLink('self')->href); + $this->assertEquals('davidchoimusic', $videoFeed->author[0]->name->text); + $this->assertEquals('http://gdata.youtube.com/feeds/users/davidchoimusic', $videoFeed->author[0]->uri->text); + $this->assertEquals(54, $videoFeed->totalResults->text); + $this->assertEquals(1, $videoFeed->startIndex->text); + $this->assertEquals(5, $videoFeed->itemsPerPage->text); + } + + public function testEmptyEntryShouldHaveNoExtensionElements() { + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testEmptyEntryShouldHaveNoExtensionAttributes() { + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionElements() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionElements)); + $this->assertTrue(count($this->feed->extensionElements) == 0); + } + + public function testSampleEntryShouldHaveNoExtensionAttributes() { + $this->feed->transferFromXML($this->feedText); + $this->assertTrue(is_array($this->feed->extensionAttributes)); + $this->assertTrue(count($this->feed->extensionAttributes) == 0); + } + + public function testEmptyVideoFeedToAndFromStringShouldMatch() { + $entryXml = $this->feed->saveXML(); + $newVideoFeed = new Zend_Gdata_YouTube_VideoFeed(); + $newVideoFeed->transferFromXML($entryXml); + $newVideoFeedXml = $newVideoFeed->saveXML(); + $this->assertTrue($entryXml == $newVideoFeedXml); + } + + public function testSamplePropertiesAreCorrect () { + $this->feed->transferFromXML($this->feedText); + $this->verifyAllSamplePropertiesAreCorrect($this->feed); + } + + public function testConvertVideoFeedToAndFromString() { + $this->feed->transferFromXML($this->feedText); + $entryXml = $this->feed->saveXML(); + $newVideoFeed = new Zend_Gdata_YouTube_VideoFeed(); + $newVideoFeed->transferFromXML($entryXml); + $this->verifyAllSamplePropertiesAreCorrect($newVideoFeed); + $newVideoFeedXml = $newVideoFeed->saveXML(); + $this->assertEquals($entryXml, $newVideoFeedXml); + } + +} diff --git a/zend/tests/Zend/Gdata/YouTube/VideoQueryTest.php b/zend/tests/Zend/Gdata/YouTube/VideoQueryTest.php new file mode 100644 index 0000000..e119e0a --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/VideoQueryTest.php @@ -0,0 +1,277 @@ +newVideoQuery(); + $query->setOrderBy('viewCount'); + $query->setVideoQuery('foobar'); + $expectedString = '?orderby=viewCount&vq=foobar'; + $this->assertEquals($expectedString, $query->getQueryString()); + } + + public function testQueryStringConstructionV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $query->setOrderBy('viewCount'); + $query->setVideoQuery('version2'); + $expectedString = '?orderby=viewCount&q=version2'; + $this->assertEquals($expectedString, $query->getQueryString(2)); + } + + public function testSafeSearchQueryV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + $query->setRacy('include'); + try { + $query->getQueryString(2); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Zend_Gdata_App_VersionException' . + ' expected but not found'); + } + + public function testLocationRadiusV1() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + $query->setLocationRadius('1km'); + try { + $query->getQueryString(1); + } catch (Zend_Gdata_App_VersionException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Zend_Gdata_App_VersionException' . + ' expected but not found'); + } + + public function testLocationV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $query->setLocation('-37.122,122.01'); + $expectedString = '?location=-37.122%2C122.01'; + $this->assertEquals($expectedString, $query->getQueryString(2)); + } + + public function testLocationExceptionOnNonNumericV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + + try { + $query->setLocation('mars'); + } catch (Zend_Gdata_App_InvalidArgumentException $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' . + 'IllegalArgumentException when using alpha in setLocation'); + } + + public function testLocationExceptionOnOnlyOneCoordinateV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + + try { + $query->setLocation('-25.001'); + } catch (Zend_Gdata_App_InvalidArgumentException $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' . + 'IllegalArgumentException when using only 1 coordinate ' . + 'in setLocation'); + } + + public function testUploaderExceptionOnInvalidV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + + try { + $query->setUploader('invalid'); + } catch (Zend_Gdata_App_InvalidArgumentException $e) { + $exceptionCaught = true; + } + + $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' . + 'IllegalArgumentException when using invalid string in ' . + 'setUploader.'); + } + + public function testProjectionPresentInV2Query() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $query->setVideoQuery('foo'); + $expectedString = 'https://gdata.youtube.com/feeds/api/videos?q=foo'; + $this->assertEquals($expectedString, $query->getQueryUrl(2)); + } + + public function testSafeSearchParametersInV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $exceptionCaught = false; + try { + $query->setSafeSearch('invalid'); + } catch (Zend_Gdata_App_InvalidArgumentException $e) { + $exceptionCaught = true; + } + $this->assertTrue($exceptionCaught, 'Expected Zend_Gdata_App_' . + 'InvalidArgumentException when using invalid value for ' . + 'safeSearch.'); + } + + /** + * @group ZF-8720 + * @expectedException Zend_Gdata_App_InvalidArgumentException + */ + public function testVideoQuerySetLocationException() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $location = 'foobar'; + $this->assertNull($query->setLocation($location)); + } + + /** + * @group ZF-8720 + * @expectedException Zend_Gdata_App_InvalidArgumentException + */ + public function testVideoQuerySetLocationExceptionV2() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $location = '-100x,-200y'; + $this->assertNull($query->setLocation($location)); + } + + /** + * @group ZF-8720 + * @expectedException Zend_Gdata_App_InvalidArgumentException + */ + public function testVideoQuerySetLocationExceptionV3() + { + $yt = new Zend_Gdata_YouTube(); + $query = $yt->newVideoQuery(); + $location = '-100x,-200y!'; + $this->assertNull($query->setLocation($location)); + } + + /** + * @group ZF-8720 + */ + public function testQueryExclamationMarkRemoveBug() + { + $yt = new Zend_Gdata_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()); + } + + /** + * @group ZF-12500 + */ + public function testQueryUrlForFeedTypRelated() + { + $yt = new Zend_Gdata_YouTube(); + + // Query + $query = $yt->newVideoQuery(); + $query->setFeedType('related', 'foo'); + + // Test + $this->assertSame( + 'https://gdata.youtube.com/feeds/api/videos/foo/related', + $query->getQueryUrl() + ); + } + + /** + * @group ZF-12500 + */ + public function testQueryUrlForFeedTypResponses() + { + $yt = new Zend_Gdata_YouTube(); + + // Query + $query = $yt->newVideoQuery(); + $query->setFeedType('responses', 'foo'); + + // Test + $this->assertSame( + 'https://gdata.youtube.com/feeds/api/videos/foo/responses', + $query->getQueryUrl() + ); + } + + /** + * @group ZF-12500 + */ + public function testQueryUrlForFeedTypComments() + { + $yt = new Zend_Gdata_YouTube(); + + // Query + $query = $yt->newVideoQuery(); + $query->setFeedType('comments', 'foo'); + + // Test + $this->assertSame( + 'https://gdata.youtube.com/feeds/api/videos/foo/comments', + $query->getQueryUrl() + ); + } +} diff --git a/zend/tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml new file mode 100644 index 0000000..a975d7d --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/ActivityEntryDataSample1.xml @@ -0,0 +1,23 @@ + + + tag:youtube.com,2008:event:Z2RweXRob24xMTIzNDMwMDAyMzI5NTQ2Nzg2MA%3D%3D + 2009-01-16T09:13:49.000-08:00 + + + tayzonzay has favorited a video + + + + + tayzonzay + http://gdata.youtube.com/feeds/api/users/tayzonzay + + z3U0kuLH974 + foo + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml new file mode 100644 index 0000000..5e25ddb --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/ActivityFeedDataSample1.xml @@ -0,0 +1,47 @@ + + + 2009-01-28T09:13:49.000-08:00 + + + + + + Activity of tayzonzay + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + YouTube + http://www.youtube.com/ + + YouTube data API + 12 + 1 + 25 + + 2009-01-16T09:13:49.000-08:00 + + + tayzonzay has favorited a video + + + + + tayzonzay + http://gdata.youtube.com/feeds/api/users/tayzonzay + + z3U0kuLH974 + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml new file mode 100644 index 0000000..f36f905 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/CommentEntryDataSample1.xml @@ -0,0 +1,20 @@ + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052 + 2007-09-02T18:00:04.000-07:00 + 2007-09-02T18:00:04.000-07:00 + + how to turn ... + how to turn rejection and heartbreak into something positive is the big mystery of life but you're managed to turn it to your advantage with a beautiful song. Who was she? + + + + + reneemathome + http://gdata.youtube.com/feeds/users/reneemathome + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml new file mode 100644 index 0000000..d865ed0 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/CommentFeedDataSample1.xml @@ -0,0 +1,112 @@ + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments + 2007-09-21T02:32:55.032Z + + Comments on '"That Girl" - Original Song - Acoustic Version' + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + + YouTube + http://www.youtube.com/ + + YouTube data API + 100 + 1 + 4 + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/CE0314DEBFFC9052 + 2007-09-02T18:00:04.000-07:00 + 2007-09-02T18:00:04.000-07:00 + + how to turn ... + how to turn rejection and heartbreak into + something positive is the big mystery of life but you're + managed to turn it to your advantage with a beautiful song. Who + was she? + + + + + reneemathome + http://gdata.youtube.com/feeds/users/reneemathome + + + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/405F5D8E73538763 + 2007-09-02T20:51:52.000-07:00 + 2007-09-02T20:51:52.000-07:00 + + The stars are ... + The stars are flying... Make something + with this!!!:) + + + + + minoujill + http://gdata.youtube.com/feeds/users/minoujill + + + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/DA7550644FFCF2EC + 2007-09-02T22:22:27.000-07:00 + 2007-09-02T22:22:27.000-07:00 + + awesome song! + awesome song! + + + + + beeGoaTee + http://gdata.youtube.com/feeds/users/beeGoaTee + + + + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg/comments/B99ACB2520430E90 + 2007-09-03T10:46:45.000-07:00 + 2007-09-03T10:46:45.000-07:00 + + This is GOOD!! + This is GOOD!! + + + + + Grosh62 + http://gdata.youtube.com/feeds/users/Grosh62 + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml new file mode 100644 index 0000000..e375401 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/ContactEntryDataSample1.xml @@ -0,0 +1,26 @@ + + + http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser + 1970-01-14T04:17:17.804-08:00 + 2007-09-21T02:44:41.134Z + + + testuser + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + testuser + accepted + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml new file mode 100644 index 0000000..23c9010 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/ContactFeedDataSample1.xml @@ -0,0 +1,51 @@ + + + http://gdata.youtube.com/feeds/users/davidchoimusic/contacts + 2007-09-21T02:44:41.135Z + + davidchoimusic's Contacts + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + davidchoimusic + http://gdata.youtube.com/feeds/users/davidchoimusic + + YouTube data API + 1558 + 1 + 5 + + http://gdata.youtube.com/feeds/users/davidchoimusic/contacts/testuser + 1970-01-14T04:17:17.804-08:00 + 2007-09-21T02:44:41.134Z + + + testuser + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + testuser + accepted + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml b/zend/tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml new file mode 100644 index 0000000..5dfb1f8 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/FormUploadTokenResponseSample.xml @@ -0,0 +1 @@ +http://uploads.gdata.youtube.com/action/FormDataUpload/AIwbF1_JjEQ9cGTjEAd5FKwV42SeNWJexmc5y7XR-eFj24uqbqU6NRcxKJW_4R-sYISLxQAIwbFAQ21fImpR2iYPaFnfuCvfbCB3qBxl5qXiZlpH3lfkungiSPoyw1iOM1gFB6Nx-wmY-kjprNT3qtdp7LJCLfngn11Ne_X9Jd44Vz8AzygtEtaDGyib5tnri0O0-V5pwcAPCHIJurOMsOpA2zInW8V8qHk2S2LheXfTXVbqc0Li9iCBpsoBGbykYU0moNoyGAaKRbSBD0oPnCv6v9Rll5Zjvivi2hQt-Br2JDb9wVeLv3qyAFaeyN6X6k32RyaAHs_n8d8d_oSriQmvS8g1HxSCS4dnoGL7tafQ4SBqnrQEb-hxFeu1ZrAwCLv diff --git a/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml new file mode 100644 index 0000000..6007c66 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSample1.xml @@ -0,0 +1,82 @@ + + + + http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55 + + 2008-06-10T13:55:32.000-07:00 + + andyland74sFriend sent you a video! + Check out this video! + + + + + + + + + + andyland74sFriend + + http://gdata.youtube.com/feeds/api/users/andyland74sFriend + + + + Learning the ABCs + + A great method for teaching kids the alphabet. + + alphabet, teaching, children + + + Education + + + + + + + + + + + + + + + Check out this video! + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml new file mode 100644 index 0000000..d2d17b8 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/InboxEntryDataSampleV2.xml @@ -0,0 +1,88 @@ + + + tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U + 2008-06-10T13:55:32.000-07:00 + 2008-06-10T13:55:32.000-07:00 + 2008-06-10T20:55:32.000Z + + + + andyland74sFriend sent you a video! + Check out this video! + + + + + + + + + + + andyland74sFriend + http://gdata.youtube.com/feeds/api/users/andyland74sFriend + + + Learning the ABCs + + A great method for teaching kids the alphabet. + + alphabet, teaching, children + + jXE6G9CYcJs + andyland74sFriend + + Education + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml new file mode 100755 index 0000000..99374f1 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSample1.xml @@ -0,0 +1,107 @@ + + + http://gdata.youtube.com/feeds/api/users/default/inbox + 2008-06-10T20:55:40.271Z + + Inbox of andyland74 + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + andyland74 + http://gdata.youtube.com/feeds/api/users/andyland74 + + YouTube data API + 1 + 1 + 25 + + + http://gdata.youtube.com/feeds/api/users/andyland74/inbox/ffb9a5f32cd5f55 + + 2008-06-10T13:55:32.000-07:00 + + andyland74sFriend sent you a video! + Check out this video! + + + + + + + + + + andyland74sFriend + + http://gdata.youtube.com/feeds/api/users/andyland74sFriend + + + + Learning the ABCs + + A great method for teaching kids the alphabet. + + alphabet, teaching, children + + + Education + + + + + + + + + + + + + + + Check out this video! + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml new file mode 100755 index 0000000..57f0b47 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/InboxFeedDataSampleV2.xml @@ -0,0 +1,119 @@ + + + tag:youtube,2008:user:andyland74:inbox + 2008-07-21T17:54:30.236Z + + Inbox of andyland74 + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + + andyland74 + http://gdata.youtube.com/feeds/api/users/andyland74 + + YouTube data API + 1 + 1 + 25 + + tag:youtube,2008:user:andyland74:inbox:D_uaXzLRX1U + 2008-06-10T13:55:32.000-07:00 + 2008-06-10T13:55:32.000-07:00 + 2008-06-10T20:55:32.000Z + + + + andyland74sFriend sent you a video! + Check out this video! + + + + + + + + + + + andyland74sFriend + http://gdata.youtube.com/feeds/api/users/andyland74sFriend + + + Learning the ABCs + + A great method for teaching kids the alphabet. + + alphabet, teaching, children + + jXE6G9CYcJs + andyland74sFriend + + Education + + + + + + + + + + + + + + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml new file mode 100644 index 0000000..2beed6c --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSample1.xml @@ -0,0 +1,30 @@ + + + + http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7 + 2007-01-29T22:42:12.000-08:00 + 2007-09-20T13:42:19.000-07:00 + + + YouTube Musicians + Music from talented people on YouTube. + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + Music from talented people on YouTube. + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml new file mode 100644 index 0000000..44cae2d --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListEntryDataSampleV2.xml @@ -0,0 +1,16 @@ + + +tag:youtube.com,2008:user:googledevelopers:playlist:8E2186857EE27746 +2007-08-23T21:48:43.000Z +2008-12-10T09:56:03.000Z + +Non-google Interviews +This playlist contains interviews with people outside of Google. + + + + +googledevelopershttp://gdata.youtube.com/feeds/api/users/googledevelopers +8E2186857EE27746 +1 + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml new file mode 100644 index 0000000..e18908e --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSample1.xml @@ -0,0 +1,79 @@ + + + http://gdata.youtube.com/feeds/users/testuser/playlists + 2007-09-20T20:59:47.530Z + + testuser's Playlists + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + YouTube + data API + 2 + 1 + 25 + + + http://gdata.youtube.com/feeds/users/testuser/playlists/A0F668D93B388F99 + 2007-01-17T14:13:22.000-08:00 + 2007-02-04T21:56:42.000-08:00 + + Korean/Chinese Playlist + Testing characters + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + Testing characters + + + + + http://gdata.youtube.com/feeds/users/testuser/playlists/46A2F8C9B36B6FE7 + 2007-01-29T22:42:12.000-08:00 + 2007-09-20T13:42:19.000-07:00 + + + YouTube Musicians + Music from talented people on YouTube. + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + Music from talented people on YouTube. + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml new file mode 100644 index 0000000..3a0d148 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListFeedDataSampleV2.xml @@ -0,0 +1,553 @@ + + + tag:youtube.com,2008:user:GoogleDevelopers:playlists + 2008-12-10T09:56:03.000Z + + Playlists of GoogleDevelopers + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + + + + GoogleDevelopers + http://gdata.youtube.com/feeds/api/users/googledevelopers + + YouTube data API + 70 +1 + 25 + + tag:youtube.com,2008:user:GoogleDevelopers:playlist:8E2186857EE27746 + 2007-08-23T21:48:43.000Z + 2008-12-10T09:56:03.000Z + + Non-google Interviews + This playlist contains interviews with people outside of Google. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + + 8E2186857EE27746 + 1 + + + tag:youtube.com,2008:user:GoogleDevelopers:playlist:4AE5C0D23C2EB82D + 2007-08-23T21:50:19.000Z + 2008-12-11T14:04:33.000Z + + + + From Google Engineers + These videos are interviews straight from the horses mouth... the Google teams themselves. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + + 4AE5C0D23C2EB82D + 5 + + + tag:youtube.com,2008:user:GoogleDevelopers:playlist:2C63610CE65A92B9 + 2007-08-28T16:11:35.000Z + 2008-12-12T18:47:53.000Z + + + + + Google Code For Educators + Videos from Google Code For Educators + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + + 2C63610CE65A92B9 + 5 + + + tag:youtube.com,2008:user:GoogleDevelopers:playlist:D9740C0183D07BE6 + 2007-08-30T00:03:01.000Z + 2008-12-08T21:49:25.000Z + + + + + Gears + All videos related to Gears + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + + D9740C0183D07BE6 + 10 + + + tag:youtube.com,2008:user:GoogleDevelopers:playlist:3A74996A44A8FA83 + 2007-10-12T22:26:05.000Z + 2008-12-12T18:48:33.000Z + + + + +Google Summer of Code +The Google Summer of Code is an annual program in which Google awards stipends to students who successfully complete a free software / open-source coding project during the summer. This playlist contains videos that touch on the Summer of Code. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +3A74996A44A8FA83 +2 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:0559F3902CC876AE +2007-10-15T22:04:22.000Z +2008-12-10T11:49:44.000Z + + + + + +Google Mashup Editor +Videos related to the Google Mashup Editor + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +0559F3902CC876AE +2 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:327240CFB48BEC5D +2007-10-15T22:16:04.000Z +2008-12-07T14:19:41.000Z + + + + + +Google Gadgets +Content on all types of gadgets (desktop, igoogle, and embedable!) + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +327240CFB48BEC5D +4 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:EC7C82F4E9ACC351 +2007-10-15T22:17:03.000Z +2008-12-10T14:18:17.000Z + + + + + + +Google Maps and Earth +All things Geo + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +EC7C82F4E9ACC351 +16 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:968FABA11F2EDEA1 +2007-10-15T22:18:00.000Z +2008-12-04T21:40:22.000Z + + + + + + +Google Web Toolkit +Content on the Google Web Toolkit + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +968FABA11F2EDEA1 +34 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:E6DE6EC9A373AF57 +2007-10-15T22:20:18.000Z +2008-12-12T16:53:20.000Z + + + + + + +Google Data APIs +All things related to Google Data APIs + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +E6DE6EC9A373AF57 +24 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:CCAE880913CAFE9B +2007-10-15T22:24:17.000Z +2008-12-12T19:55:04.000Z + + + + + +AdSense APIs +Content related to our ad APIs + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +CCAE880913CAFE9B +1 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:72CF07D200AA2AFA +2007-10-17T18:36:51.000Z +2008-12-09T02:59:12.000Z + + + +YouTube +Content related to YouTube APIs + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +72CF07D200AA2AFA +18 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:BC2ECF70FE499266 +2007-10-17T18:38:13.000Z +2008-12-10T09:56:12.000Z + + +Open Source at Google +Content related to open source. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +BC2ECF70FE499266 +8 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:79B6967AC7A09B42 +2007-10-17T18:40:07.000Z +2008-11-30T15:48:20.000Z + + + +Google Search +Content released to Search APIs + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +79B6967AC7A09B42 +2 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:DA15B72EA2633F26 +2007-10-17T18:41:25.000Z +2008-12-11T14:37:00.000Z + + + +Google AJAX APIs +Content related to the various Ajax APIs + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +DA15B72EA2633F26 +5 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:18E9C145F20ED640 +2007-10-17T18:42:21.000Z +2008-12-12T18:47:55.000Z + + +Google Mobile +Content related to mobile development and Google + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +18E9C145F20ED640 +1 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:74D78B3235613DCB +2007-10-17T18:44:32.000Z +2008-12-12T18:48:36.000Z + + +Gmail +Content related to the Gmail product. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +74D78B3235613DCB +1 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:7F19205748B0A698 +2007-10-19T18:45:08.000Z +2008-12-12T18:48:40.000Z + + + + +Google Base +Content related to the Google Base product + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +7F19205748B0A698 +2 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:59127FA00275EB77 +2007-10-29T19:26:57.000Z +2008-12-03T17:30:36.000Z + + +FeedBurner +FeedBurner API videos + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +59127FA00275EB77 +1 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:A31A1098FDE85663 +2007-10-29T23:52:25.000Z +2008-12-11T09:55:28.000Z + + +Google Apps +Google Apps User Videos + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +A31A1098FDE85663 +3 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:CF46C525B4C90C17 +2007-10-30T01:19:18.000Z +2008-12-04T21:39:22.000Z + + + +Google AJAX Feed API +AJAX Feed API + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +CF46C525B4C90C17 +2 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:5F0F046F77B7B62A +2007-11-02T15:29:38.000Z +2008-12-12T12:58:06.000Z + + +OpenSocial +Tutorials on how to build OpenSocial applications, videos from our Campfire One launch as well as interviews with some of our partners: Slide, Ning, Hi5, Plaxo, Flixster, iLike, Salesforce, LinkedIn, RockYou and more. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +5F0F046F77B7B62A +48 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:586D322B5E2764CF +2007-11-13T19:41:21.000Z +2008-12-12T18:57:21.000Z + + + + + + + + +Android +Demos and tutorials about the new Android platform. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +586D322B5E2764CF +32 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:8B1C566EDD2DCB77 +2007-11-28T21:45:37.000Z +2008-12-12T18:47:52.000Z + + + + + + + + + + + + + + + + +OpenSocial Interviews +We brought in a bunch of developers and partners to talk about OpenSocial and demo their stuff :) Big Thanks to Shelfari, E-junkie, Ning, Flixster, Plaxo, iLike, FotoFlexer, LinkedIn, Hi5, Qloud, Bleacher Report, Slide, RockYou, Oberon, Chronus, and Hungry Machine! + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +8B1C566EDD2DCB77 +16 + + +tag:youtube.com,2008:user:GoogleDevelopers:playlist:8F1A9670BA923DF3 +2007-12-04T18:07:07.000Z +2008-12-12T18:48:36.000Z + + + + +Google Mac +Content related to Google Mac development, including the Google Mac Playground. + + + + + +GoogleDevelopers +http://gdata.youtube.com/feeds/api/users/googledevelopers + +8F1A9670BA923DF3 +3 + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListVideoEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListVideoEntryDataSampleV2.xml new file mode 100644 index 0000000..de65064 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistListVideoEntryDataSampleV2.xml @@ -0,0 +1,66 @@ + + + tag:youtube.com,2008:playlist:CCAE880913CAFE9B + 2008-12-12T19:55:04.000Z + + + + + + AdSense APIs + Content related to our ad APIs + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + GoogleDevelopershttp://gdata.youtube.com/feeds/api/users/googledevelopers + YouTube data API + 1 + 1 + 25 + CCAE880913CAFE9B + + AdSense APIs + Content related to our ad APIs + + + + tag:youtube.com,2008:playlist:CCAE880913CAFE9B:C63BCCC84EBE64BD + 2008-12-12T19:56:19.635Z + + + + + Google Developer Day - Brazil - AdSense + + + + + + GoogleDevelopershttp://gdata.youtube.com/feeds/api/users/googledevelopers + + Google Developer Day - Brazil - AdSense + Roberto Grosman - O Google AdSense oferece aos editores de sites, de qualquer tamanho, uma forma rápida e fácil de exibir anúncios Google nas suas páginas de conteúdo e ganhar dinheiro. Os anúncios são relevantes, por que estão relacionados àquilo que os usuários procuram no seu site ou combinam com as características e interesses dos visitantes que o seu conteúdo normalmente atrai. Você pode monetizar e otimizar as suas páginas de conteúdo ao mesmo tempo. Esta palestra tem como objetivo apresentar a ferramenta AdSense e suas vantagens. + adsense, google + + RTQDqPtErB0 + 2007-06-01T14:33:00.000Z + + GoogleDeveloperDay + Howto + + + + + + + + + + + + + 1 + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml new file mode 100644 index 0000000..5449374 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSample1.xml @@ -0,0 +1,109 @@ + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21 + 2007-09-20T22:56:57.061Z + + "Crazy (Gnarles Barkley)" - Acoustic Cover + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=UMFI1hdm96E"><img + alt="" + src="http://img.youtube.com/vi/UMFI1hdm96E/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=UMFI1hdm96E">&quot;Crazy + (Gnarles Barkley)&quot; - Acoustic Cover</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Gnarles Barkley acoustic cover + http://www.myspace.com/davidchoimusic</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; + padding-left: 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 113321</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1005 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:15</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic + music, singing, gnarls, barkley, acoustic, cover + + + Music + + + + + + + + + + + + + 1 + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml new file mode 100644 index 0000000..aeb880c --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoEntryDataSampleV2.xml @@ -0,0 +1,89 @@ + + + +tag:youtube.com,2008:playlist:4E6265CEF8BAA793:579617126485907C +2008-12-16T18:32:03.434Z + + + + + + + + +Paris Police Find Dynamite in Department Store + + + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + + +Paris Police Find +French police found. +department, dynamite, explosives, find + +Lur391T5ApY +2008-12-16T17:01:42.000Z + +AssociatedPress + +News + + + + + + + + + + +New York, NY +2008-12-16 + + + +1 + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml new file mode 100644 index 0000000..3c47b3e --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/PlaylistVideoFeedDataSample1.xml @@ -0,0 +1,1495 @@ + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7 + 2007-09-20T13:42:19.000-07:00 + + + YouTube Musicians + Music from talented people on YouTube. + + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + YouTube + data API + 13 + 1 + 25 + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/efb9b9a8dd4c2b21 + 2007-09-20T22:56:57.061Z + + "Crazy (Gnarles Barkley)" - Acoustic + Cover + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=UMFI1hdm96E"><img + alt="" + src="http://img.youtube.com/vi/UMFI1hdm96E/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=UMFI1hdm96E">&quot;Crazy + (Gnarles Barkley)&quot; - Acoustic Cover</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Gnarles Barkley acoustic cover + http://www.myspace.com/davidchoimusic</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; + padding-left: 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 113321</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1005 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:15</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "Crazy (Gnarles Barkley)" - + Acoustic Cover + Gnarles Barkley acoustic + cover + http://www.myspace.com/davidchoimusic + music, singing, gnarls, barkley, acoustic, + cover + + + Music + + + + + + + + + + + + + 1 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/c9d8e923d586c337 + 2007-09-20T22:56:57.061Z + + gnals barkley + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=waQuw1P7VU8"><img + alt="" + src="http://img.youtube.com/vi/waQuw1P7VU8/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=waQuw1P7VU8">gnals + barkley</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>Me + singing Crazy by gnarls + barkley</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=esmeedenters">esmeedenters</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 219224</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1753 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:59</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + esmeedenters + http://gdata.youtube.com/feeds/users/esmeedenters + + + gnals barkley + Me singing Crazy by gnarls + barkley + music, singing, gnarls, + barkley + + + Music + + + + + + + + + + + + + 2 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/8574b0cf3b5045b9 + 2007-09-20T22:56:57.061Z + + Can't take my eyes off of you + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=xjidkN6kleU"><img + alt="" + src="http://img.youtube.com/vi/xjidkN6kleU/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=xjidkN6kleU">Can&#39;t + take my eyes off of you</a> <br></div> + <div style="font-size: 12px; margin: 3px + 0px;"><span>Lauryn Hill Cover - Can&#39;t take my + eyes off of you. my way--- a good + way?</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=munilicious">munilicious</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 12968</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div> + <div style="font-size: 11px;">34 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:18</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + munilicious + http://gdata.youtube.com/feeds/users/munilicious + + + Can't take my eyes off of + you + Lauryn Hill Cover - Can't + take my eyes off of you. my way--- a good + way? + Lauryn, Hill, Can't, take, my, eyes, off, of, + you + + + Music + + + + + + + + + + + + + 3 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/6d42a26a97a53c78 + 2007-09-20T22:56:57.062Z + + hanging by a moment (cover) + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=MOxExzhhW0c"><img + alt="" + src="http://img.youtube.com/vi/MOxExzhhW0c/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=MOxExzhhW0c">hanging by + a moment (cover)</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>my + sister(guitar) and me jamming + lifehouse</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=lauwarm">lauwarm</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 7186</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div> + <div style="font-size: 11px;">24 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">00:30</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + lauwarm + http://gdata.youtube.com/feeds/users/lauwarm + + + hanging by a moment + (cover) + my sister(guitar) and me + jamming lifehouse + lifehouse, hanging, by, moment, cover, + acoustic + + + Music + + + + + + + + + + + + + 4 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/f78779d50b24db79 + 2007-09-20T22:56:57.062Z + + I'LL BE-MEN'S OCTET (ACAPELLA) + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=_KHqQc1nn_0"><img + alt="" + src="http://img.youtube.com/vi/_KHqQc1nn_0/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=_KHqQc1nn_0">I&#39;LL + BE-MEN&#39;S OCTET (ACAPELLA)</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>UC BERKELEY&#39;S MEN&#39;S + OCTET (ACAPELLA)</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=boredom">boredom</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 46416</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">116 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:06</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + boredom + http://gdata.youtube.com/feeds/users/boredom + + + I'LL BE-MEN'S OCTET + (ACAPELLA) + UC BERKELEY'S MEN'S OCTET + (ACAPELLA) + ACAPELLA, berkeley, octet + + + Music + + + + + + + + + + + + + 5 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/d5fead6a034eb51c + 2007-09-20T22:56:57.062Z + + Kiss the Girl + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=EV1_qPBuDt8"><img + alt="" + src="http://img.youtube.com/vi/EV1_qPBuDt8/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=EV1_qPBuDt8">Kiss the + Girl</a> <br></div> <div style="font-size: + 12px; margin: 3px 0px;"><span>Alma College&#39;s + Scots on the Rocks sing their acapella rendition of Kiss the + Girl from the Little + Mermaid</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=cmorris">cmorris</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 37218</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">312 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">03:16</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + cmorris + http://gdata.youtube.com/feeds/users/cmorris + + + Kiss the Girl + Alma College's Scots on the + Rocks sing their acapella rendition of Kiss the Girl from the + Little Mermaid + acapella + + + Music + + + + + + + + + + + + + 6 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/618d7dba982c0d7e + 2007-09-20T22:56:57.063Z + + Oasis "Wonderwall" Acoustic Cover by + ortoPilot + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=t4EaHIpjTTY"><img + alt="" + src="http://img.youtube.com/vi/t4EaHIpjTTY/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=t4EaHIpjTTY">Oasis + &quot;Wonderwall&quot; Acoustic Cover by + ortoPilot</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>Oasis + &quot;Wonderwall&quot; Acoustic Cover by ortoPilot + acoustic version of wonderwall influenced by RYAN ADAMS mp3 + download and TABS @ www.ortoPilot.com enjoy! if you like this + vid, SUBSCRIBE to my vids, + cheers!</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=ortoPilot">ortoPilot</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 92395</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">521 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:01</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + ortoPilot + http://gdata.youtube.com/feeds/users/ortoPilot + + + Oasis "Wonderwall" Acoustic Cover + by ortoPilot + Oasis "Wonderwall" Acoustic + Cover by ortoPilot acoustic version of wonderwall influenced + by RYAN ADAMS mp3 download and TABS @ www.ortoPilot.com + enjoy! if you like this vid, SUBSCRIBE to my vids, + cheers! + acoustic, guitar, cover, oasis, wonderwall, + ortopilot, matt, hutchison, live, tab, tabs, + tutorial + + + Music + + + + + + + + + + + + + 7 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/4bfaab0ffb00dfdd + 2007-09-20T22:56:57.063Z + + Pancakes! + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=PnCVZozHTG8"><img + alt="" + src="http://img.youtube.com/vi/PnCVZozHTG8/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=PnCVZozHTG8">Pancakes!</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>A short music video about making + pancakes =) This video has been on ABC&#39;s &quot;Good + Morning America&quot; show, 16th August. + http://abcnews.go.com/Video/playerIndex?id=2318825 It has also + been aired on Fox news in America, Sky News, and Five News in + Britain and on ABC (Austrailain Broadcasting Company) in + Australia. I live in Scotland, these are British pancakes which + are like Crépes, to clear up the confusion. Lemon + and Sugar is very popular on pacakes here. It took over a week + to make this, it&#39;s the most heavily editied project I + have done yet, and it was not easy at all, but I have created + something that I&#39;m very proud of =) Song written, + performed and produced by me, video written, edited and filmed + by me. MP3 available on my website! James Provan Thanks to + Yukeh for the the voice that says &quot;GiR - it&#39;s + time for pancakes!&quot; at the + start.</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=GiR2007">GiR2007</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 2249048</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">17754 <span + style="color: #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:22</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=1">Film + &amp; + Animation</a></td></tr></tbody></table></div> + + + + + + + GiR2007 + http://gdata.youtube.com/feeds/users/GiR2007 + + + Pancakes! + A short music video about + making pancakes =) This video has been on ABC's "Good Morning + America" show, 16th August. + http://abcnews.go.com/Video/playerIndex?id=2318825 It has + also been aired on Fox news in America, Sky News, and Five + News in Britain and on ABC (Austrailain Broadcasting Company) + in Australia. I live in Scotland, these are British pancakes + which are like Crépes, to clear up the confusion. + Lemon and Sugar is very popular on pacakes here. It took over + a week to make this, it's the most heavily editied project I + have done yet, and it was not easy at all, but I have created + something that I'm very proud of =) Song written, performed + and produced by me, video written, edited and filmed by me. + MP3 available on my website! James Provan Thanks to Yukeh for + the the voice that says "GiR - it's time for pancakes!" at + the start. + stop, motion, pancakes, GiR2007, food, tasty, + nutella, jam, maple, syrup, animation, GMA, good, morning, + america, goodmorning + + + Film + + + + + + + + + + + + + + 8 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/46632a732cae0cbc + 2007-09-20T22:56:57.063Z + + Ana Free - Chained + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=_6ceUy9lVdM"><img + alt="" + src="http://img.youtube.com/vi/_6ceUy9lVdM/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=_6ceUy9lVdM">Ana Free - + Chained</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>The + second upload of the day.. :) All is explained in the video, no + point in writing it here! Take care *** + Ana</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=anafree">anafree</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 688963</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div> + <div style="font-size: 11px;">4530 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">03:11</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + anafree + http://gdata.youtube.com/feeds/users/anafree + + + Ana Free - Chained + The second upload of the + day.. :) All is explained in the video, no point in writing + it here! Take care *** Ana + anafree, ana, free, chained, original, + acoustic, love + + + Music + + + + + + + + + + + + + 9 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/e67d5bf916676e20 + 2007-09-20T22:56:57.064Z + + Ana Free (Bic Runga - Sway + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=ihQW-pWlkJw"><img + alt="" + src="http://img.youtube.com/vi/ihQW-pWlkJw/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=ihQW-pWlkJw">Ana Free + (Bic Runga - Sway</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>This + is Sway by Bic Runga, difficult to sing and I guess to play + aswell..:) Hope you enjoy + it!</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=anafree">anafree</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 282936</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">2224 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">03:24</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + anafree + http://gdata.youtube.com/feeds/users/anafree + + + Ana Free (Bic Runga - + Sway + This is Sway by Bic Runga, + difficult to sing and I guess to play aswell..:) Hope you + enjoy it! + bic, runga, sway, ana, free, anafree, + acoustic, singing + + + Music + + + + + + + + + + + + + 10 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/a3011180d79eff53 + 2007-09-20T22:56:57.064Z + + I'm falling in love (u can buy the mp3 at + justinsteere.com) + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=oXjInYHk2j0"><img + alt="" + src="http://img.youtube.com/vi/oXjInYHk2j0/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=oXjInYHk2j0">I&#39;m + falling in love (u can buy the mp3 at + justinsteere.com)</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>this + is an original acoustic song. to purchase this song and others + check out justinsteere.com VOTE FOR THIS VIDEO AT famecast.com + (just search my name and click on vote for artist) + myspace.com/jsteere subscribe for instant video updates. more + videos coming soon. all the money i make from the mp3 downloads + is going towards making my real cd in november. enjoy + :)</span></div></td> <td style="font-size: + 11px; line-height: 1.4em; padding-left: 20px; padding-top: + 1px;" width="146" valign="top"><div><span + style="color: #666666; font-size: 11px;">From:</span> + <a + href="http://www.youtube.com/profile?user=bunetaybaz">bunetaybaz</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 653489</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">4654 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">03:17</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + bunetaybaz + http://gdata.youtube.com/feeds/users/bunetaybaz + + + I'm falling in love (u can buy the + mp3 at justinsteere.com) + this is an original acoustic + song. to purchase this song and others check out + justinsteere.com VOTE FOR THIS VIDEO AT famecast.com (just + search my name and click on vote for artist) + myspace.com/jsteere subscribe for instant video updates. more + videos coming soon. all the money i make from the mp3 + downloads is going towards making my real cd in november. + enjoy :) + justin, steere, jason, mraz, im, yours, dax, + flame, brookers, david, gray, josh, groban, you, and, I, + both, right, kind, of, phrase, better + + + Music + + + + + + + + + + + + + + 11 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/798565c7d1c75453 + 2007-09-20T22:56:57.064Z + + When I Loved You + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=KjMRf4egAyA"><img + alt="" + src="http://img.youtube.com/vi/KjMRf4egAyA/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=KjMRf4egAyA">When I + Loved You</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>As + promised a new song EVERY Sunday...another original (just a + sample) I promise I&#39;ll get Sex Machine up as soon as I + can! + www.myspace.com/mishalmmoore</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; + padding-left: 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=mishalmooremusic">mishalmooremusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 715030</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div> + <div style="font-size: 11px;">2988 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:38</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + mishalmooremusic + + http://gdata.youtube.com/feeds/users/mishalmooremusic + + + When I Loved You + As promised a new song EVERY + Sunday...another original (just a sample) I promise I'll get + Sex Machine up as soon as I can! + www.myspace.com/mishalmmoore + mishal, moore, when, i, loved, + you + + + Music + + + + + + + + + + + + + + 12 + + + + http://gdata.youtube.com/feeds/playlists/46A2F8C9B36B6FE7/2c0c020593e15124 + 2007-09-20T22:56:57.065Z + + CONCEIT- Scissors & Glue ON THE RISE + CONTEST WINNER + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=R_ruSmFFdAY"><img + alt="" + src="http://img.youtube.com/vi/R_ruSmFFdAY/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=R_ruSmFFdAY">CONCEIT- + Scissors &amp; Glue ON THE RISE CONTEST WINNER</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Conceit - Scissors &amp; Glue + Prod. Memo of the Molemen from the WASTED TALENT MIXTAPE + straight out the SAN FRANCISCO BAY AREA!!! Machete Vox - Gurp + City - Strangeface - Kill Technology Much love 2 LORDS CREW UM + 86&#39;in Promo Download: + http://www.zshare.net/audio/3603976e3994ff/ Wasted Talent + Mixtape available @ myspace.com/conceit + gurpcity.net</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=conceit">conceit</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 188729</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif"></div> + <div style="font-size: 11px;">680 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:22</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + + conceit + http://gdata.youtube.com/feeds/users/conceit + + + CONCEIT- Scissors & Glue ON THE + RISE CONTEST WINNER + Conceit - Scissors & Glue + Prod. Memo of the Molemen from the WASTED TALENT MIXTAPE + straight out the SAN FRANCISCO BAY AREA!!! Machete Vox - Gurp + City - Strangeface - Kill Technology Much love 2 LORDS CREW + UM 86'in Promo Download: + http://www.zshare.net/audio/3603976e3994ff/ Wasted Talent + Mixtape available @ myspace.com/conceit + gurpcity.net + rap, music, contest, 50, cent, conceit, sf, + bay, area, ontherise, wasted, talent, gurp, city, machete, + vox + + + Music + + + + + + + + + + + + + 13 + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml new file mode 100644 index 0000000..b2db6ec --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample1.xml @@ -0,0 +1,29 @@ + + + + http://gdata.youtube.com/feeds/users/testuser/subscriptions/35bbde297dba88db + 2007-03-02T11:58:22.000-08:00 + 2007-03-02T11:58:22.000-08:00 + + + Videos published by : BBC + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSampleV2.xml new file mode 100644 index 0000000..4845693 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSampleV2.xml @@ -0,0 +1,33 @@ + + + +tag:youtube.com,2008:user:googledevelopers:subscription:Z1Lm-S9gkRQ +2007-11-16T15:15:17.000-08:00 +2007-11-16T15:15:17.000-08:00 + + +Videos published by : androiddevelopers + + + + + +GoogleDevelopers + +http://gdata.youtube.com/feeds/api/users/googledevelopers + +androiddevelopers +50 + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml new file mode 100644 index 0000000..4845693 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_channelV2.xml @@ -0,0 +1,33 @@ + + + +tag:youtube.com,2008:user:googledevelopers:subscription:Z1Lm-S9gkRQ +2007-11-16T15:15:17.000-08:00 +2007-11-16T15:15:17.000-08:00 + + +Videos published by : androiddevelopers + + + + + +GoogleDevelopers + +http://gdata.youtube.com/feeds/api/users/googledevelopers + +androiddevelopers +50 + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_favoritesV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_favoritesV2.xml new file mode 100644 index 0000000..0120c3e --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_favoritesV2.xml @@ -0,0 +1,30 @@ + + +tag:youtube.com,2008:user:zfgdata:subscription:S_KBJ3ylYwc +2008-12-15T14:59:26.000-08:00 +2008-12-15T14:59:26.000-08:00 + + +Favorites of : NBA + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +NBA + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_playlistV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_playlistV2.xml new file mode 100644 index 0000000..dbec414 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_playlistV2.xml @@ -0,0 +1,32 @@ + + +tag:youtube.com,2008:user:zfgdata:subscription:i_2YXxZb9Zg +2007-09-20T21:03:52.000-07:00 +2007-09-20T21:03:52.000-07:00 + + +From Google Engineers + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +From Google Engineers +GoogleDevelopers +4AE5C0D23C2EB82D + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_queryV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_queryV2.xml new file mode 100644 index 0000000..4f4fc87 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionEntryDataSample_queryV2.xml @@ -0,0 +1,31 @@ + + + +tag:youtube.com,2008:user:zfgdata:subscription:59NG0lkr7r4 +2008-12-15T14:48:39.000-08:00 +2008-12-15T14:48:39.000-08:00 + + +Videos matching : google + + + + + +zfgdata + +http://gdata.youtube.com/feeds/api/users/zfgdata + +google + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml new file mode 100644 index 0000000..6200054 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSample1.xml @@ -0,0 +1,105 @@ + + + + http://gdata.youtube.com/feeds/users/testuser/subscriptions + 2007-09-20T22:12:45.193Z + + testuser's Subscriptions + + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + YouTube + data API + 3 + 1 + 25 + + + http://gdata.youtube.com/feeds/users/testuser/subscriptions/35bbde297dba88db + 2007-03-02T11:58:22.000-08:00 + 2007-03-02T11:58:22.000-08:00 + + + Videos published by : BBC + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + + + + + http://gdata.youtube.com/feeds/users/testuser/subscriptions/742853a3468b2418 + 2007-09-18T21:39:36.000-07:00 + 2007-09-18T21:39:36.000-07:00 + + + Videos published by : communitychannel + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + + + + + http://gdata.youtube.com/feeds/users/testuser/subscriptions/98263c1ed3e31828 + 2007-09-20T13:45:29.000-07:00 + 2007-09-20T13:45:29.000-07:00 + + + Videos published by : ucberkeley + + + + + testuser + http://gdata.youtube.com/feeds/users/testuser + + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml new file mode 100644 index 0000000..c8ac727 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/SubscriptionFeedDataSampleV2.xml @@ -0,0 +1,138 @@ + + +tag:youtube.com,2008:user:zfgdata:subscriptions +2007-09-20T21:01:13.000-07:00 + +Subscriptions of zfgdata +http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +YouTube +data API +8 +1 +25 + +tag:youtube.com,2008:user:zfgdata:subscription:_Jkf5no0ZW0 +2007-09-20T21:01:13.000-07:00 +2007-09-20T21:01:13.000-07:00 + + +Videos published by : tonyrain + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +tonyrain +13 + + + +tag:youtube.com,2008:user:zfgdata:subscription:S_KBJ3ylYwc +2008-12-15T14:59:26.000-08:00 +2008-12-15T14:59:26.000-08:00 + + +Favorites of : NBA + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +NBA + + + +tag:youtube.com,2008:user:zfgdata:subscription:i_2YXxZb9Zg +2007-09-20T21:03:52.000-07:00 +2007-09-20T21:03:52.000-07:00 + + +From Google Engineers + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +From Google Engineers +GoogleDevelopers +4AE5C0D23C2EB82D + + + + +tag:youtube.com,2008:user:zfgdata:subscription:59NG0lkr7r4 +2008-12-15T14:48:39.000-08:00 +2008-12-15T14:48:39.000-08:00 + + +Videos matching : google + + + + + +zfgdata + +http://gdata.youtube.com/feeds/api/users/zfgdata + +google + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml new file mode 100644 index 0000000..384ac3f --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSample1.xml @@ -0,0 +1,47 @@ + + + http://gdata.youtube.com/feeds/users/darcy + 2006-03-19T11:35:56.000-08:00 + 2007-08-13T12:37:03.000-07:00 + + Darcy + + + + Fitzwilliam Darcy + http://gdata.youtube.com/feeds/users/darcy + + + 32 + A person of great interest + darcy + Pride and Prejudice + Self employed + Reading, arguing with Liz + Steventon + Longbourn in Hertfordshire, Pemberley in Derbyshire + Pride and Prejudice, 2005 + Air Con Varizzioni, The Pleasure of the Town + Gentleman + Home schooling + m + taken + + + + + + + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml new file mode 100644 index 0000000..a6d1f88 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/UserProfileEntryDataSampleV2.xml @@ -0,0 +1,71 @@ + + +tag:youtube.com,2008:user:zfgdata +2007-09-20T21:00:09.000-07:00 +2008-12-15T13:30:56.000-08:00 + + +zfgdata Channel + + + + + +zfgdata +http://gdata.youtube.com/feeds/api/users/zfgdata + +Lonely +TestAccount +I'm a lonely test account, with little to do but sit +around and wait for people to use me. I get bored in between +releases and often sleep to pass the time. Please use me more +often, as I love to show off my talent in breaking your +code. +32 +zfgdata +crime and punishment, ps i love you, the stand +f +Google +software engineering, information architecture, +photography, travel +Mountain View, CA +San Francisco, CA 94114, US +monk, heroes, law and order, top gun +imogen heap, frou frou, thievory corp, morcheeba, +barenaked ladies +Developer Programs +taken +University of the World + + + + + + + + + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml new file mode 100644 index 0000000..5840187 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSample1.xml @@ -0,0 +1,138 @@ + + + http://gdata.youtube.com/feeds/videos/UMFI1hdm96E + 2007-01-07T01:50:15.000Z + 2007-01-07T01:50:15.000Z + + + + + + + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=UMFI1hdm96E"><img + alt="" + src="http://img.youtube.com/vi/UMFI1hdm96E/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=UMFI1hdm96E">&quot;Crazy + (Gnarles Barkley)&quot; - Acoustic Cover</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Gnarles Barkley acoustic cover + http://www.myspace.com/davidchoimusic</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; padding-left: + 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 113321</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1005 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:15</span></td> <td style="font-size: + 11px; padding-left: 20px;"><span style="color: #666666; + font-size: 11px;">More in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic + music, singing, gnarls, barkley, acoustic, cover + + + Music + + DeveloperTag1 + + + + + + + + + + + + 37.398529052734375 -122.0635986328125 + + + 2008-09-25 + + + + + + yes + + The content of this video may violate the terms of use. + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml new file mode 100755 index 0000000..905883f --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSamplePrivate.xml @@ -0,0 +1,139 @@ + + + http://gdata.youtube.com/feeds/videos/UMFI1hdm96E + 2007-01-07T01:50:15.000Z + 2007-01-07T01:50:15.000Z + + + + + + + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=UMFI1hdm96E"><img + alt="" + src="http://img.youtube.com/vi/UMFI1hdm96E/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=UMFI1hdm96E">&quot;Crazy + (Gnarles Barkley)&quot; - Acoustic Cover</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Gnarles Barkley acoustic cover + http://www.myspace.com/davidchoimusic</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; padding-left: + 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 113321</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1005 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:15</span></td> <td style="font-size: + 11px; padding-left: 20px;"><span style="color: #666666; + font-size: 11px;">More in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic + music, singing, gnarls, barkley, acoustic, cover + + + Music + + DeveloperTag1 + + + + + + + + + + + + + 37.398529052734375 -122.0635986328125 + + + 2008-09-25 + + + + + + yes + + The content of this video may violate the terms of use. + + diff --git a/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml new file mode 100644 index 0000000..a833310 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/VideoEntryDataSampleV2.xml @@ -0,0 +1,63 @@ + + +tag:youtube.com,2008:video:UMFI1hdm96E +2007-01-07T01:50:15.000Z +2008-12-08T04:04:33.000Z + + + + + + + + +"Crazy (Gnarles Barkley)" - Acoustic Cover + + + + + + + davidchoimusichttp://gdata.youtube.com/feeds/api/users/davidchoimusic + + + "Crazy (Gnarles Barkley)" - Acoustic Cover + Gnarles Barkley acoustic cover http://www.myspace.com/davidchoimusic + 1 + + DeveloperTag1 + acoustic, barkley, cover, gnarls, music, singing + + UMFI1hdm96E + 2007-01-07T01:50:15.000Z + + davidchoimusic + Music + + + + + + + + + + + + + 37.398529052734375 -122.0635986328125 + + + 2008-09-25 + + + + \ No newline at end of file diff --git a/zend/tests/Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml b/zend/tests/Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml new file mode 100644 index 0000000..33ec9c7 --- /dev/null +++ b/zend/tests/Zend/Gdata/YouTube/_files/VideoFeedDataSample1.xml @@ -0,0 +1,743 @@ + + + http://gdata.youtube.com/feeds/users/davidchoimusic/uploads + 2007-09-21T02:27:22.638Z + + Davidchoimusic's Videos + http://www.youtube.com/img/pic_youtubelogo_123x63.gif + + + + + + + davidchoimusic + http://gdata.youtube.com/feeds/users/davidchoimusic + + YouTube data API + 54 + 1 + 5 + + http://gdata.youtube.com/feeds/videos/Lnio-pqLPgg + 2007-01-11T00:17:31.000Z + 2007-01-11T00:17:31.000Z + + + + + + + + + + "That Girl" - Original Song - Acoustic + Version + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=Lnio-pqLPgg"><img + alt="" + src="http://img.youtube.com/vi/Lnio-pqLPgg/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=Lnio-pqLPgg">&quot;That + Girl&quot; - Original Song - Acoustic Version</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>For the full version, check out + http://www.myspace.com/musicchester mp3 + http://www.broadjam.com/davidchoi That Girl Oh tonight + I&#39;m feeling fine I&#39;m alone just wasting time no + Friday movie nights or romantic candlelight I&#39;m just + having conversations with the thoughts in my head all I hear + are angels crying oh won&#39;t they just sing instead It + would be wrong for me to say I don&#39;t need that girl by + my side I don&#39;t need that girl in my life I + don&#39;t want to talk it out or hold her when she cries I + don&#39;t want to say she&#39;s my kind I don&#39;t + want to say that she&#39;s mine I don&#39;t want to + tell her that I love her more than life more than life, love + her more than life Honestly, this won&#39;t do how is she + doing? I tell myself I&#39;m feeling swell but I know + I&#39;m such a fool I&#39;ll just take it as a new + beginning but you know I don&#39;t feel that way who will + take all this pain away? I know it&#39;s wrong for me to + say Chorus Talk about a sin was the day I walked into the other + side I would run back in I wouldn&#39;t waste no time I + know it&#39;s wrong for me to say Chorus + www.myspace.com/davidchoimusic</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; + padding-left: 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 437209</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">2981 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">03:40</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "That Girl" - Original Song - + Acoustic Version + For the full version, check + out http://www.myspace.com/musicchester mp3 + http://www.broadjam.com/davidchoi That Girl Oh tonight I'm + feeling fine I'm alone just wasting time no Friday movie + nights or romantic candlelight I'm just having conversations + with the thoughts in my head all I hear are angels crying oh + won't they just sing instead It would be wrong for me to say + I don't need that girl by my side I don't need that girl in + my life I don't want to talk it out or hold her when she + cries I don't want to say she's my kind I don't want to say + that she's mine I don't want to tell her that I love her more + than life more than life, love her more than life Honestly, + this won't do how is she doing? I tell myself I'm feeling + swell but I know I'm such a fool I'll just take it as a new + beginning but you know I don't feel that way who will take + all this pain away? I know it's wrong for me to say Chorus + Talk about a sin was the day I walked into the other side I + would run back in I wouldn't waste no time I know it's wrong + for me to say Chorus + www.myspace.com/davidchoimusic + That, Girl, Original, Song, Acoustic, + Version, davidchoimusic + + + Music + + + + + + + + + + + + + + + http://gdata.youtube.com/feeds/videos/FWPzxVMQU8g + 2006-12-30T23:20:14.000Z + 2006-12-30T23:20:14.000Z + + + + + + + + + + + + "You Tube" (A Love Song) - Original Song - + Acoustic Version + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=FWPzxVMQU8g"><img + alt="" + src="http://img.youtube.com/vi/FWPzxVMQU8g/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=FWPzxVMQU8g">&quot;You + Tube&quot; (A Love Song) - Original Song - Acoustic + Version</a> <br></div> <div + style="font-size: 12px; margin: 3px + 0px;"><span>http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic If you want to be updated + on new videos, hit the orange &quot;subscribe&quot; + button on the top right corner! + ================================ &quot;You Tube&quot; + (A Love Song) When I wake up in the morning youtube when I + dream at night, youtube in the middle of the day, youtube you + consume my life, youtube I can&#39;t help, but think of you + I just love the things you do allow the people, to post our + videos, we love you youtube I like the founders some Asian and + some white dude but more than you I love youtube When I wake up + in the morning youtube when I dream at night, youtube in the + middle of the day, youtube you consume my life, youtube + youtube, you can comment all over me youtube, will you make + passionate love to me you can respond to my video if + you&#39;d like I&#39;ll post one right back, oh I think + I might could you add me to your favorites and I&#39;ll + post on your bulletin maybe send you a message if you promise + to write me back I&#39;ll log in and out to please you oh + you know the things I&#39;ll do oh youtube, oh youtube When + I wake up in the morning youtube when I dream at night, youtube + in the middle of the day, youtube you consume my life, + youtube</span></div></td> <td + style="font-size: 11px; line-height: 1.4em; padding-left: 20px; + padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 1495035</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">10995 <span + style="color: #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">02:57</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "You Tube" (A Love Song) - Original + Song - Acoustic Version + + http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic If you want to be + updated on new videos, hit the orange "subscribe" button on + the top right corner! ================================ "You + Tube" (A Love Song) When I wake up in the morning youtube + when I dream at night, youtube in the middle of the day, + youtube you consume my life, youtube I can't help, but think + of you I just love the things you do allow the people, to + post our videos, we love you youtube I like the founders some + Asian and some white dude but more than you I love youtube + When I wake up in the morning youtube when I dream at night, + youtube in the middle of the day, youtube you consume my + life, youtube youtube, you can comment all over me youtube, + will you make passionate love to me you can respond to my + video if you'd like I'll post one right back, oh I think I + might could you add me to your favorites and I'll post on + your bulletin maybe send you a message if you promise to + write me back I'll log in and out to please you oh you know + the things I'll do oh youtube, oh youtube When I wake up in + the morning youtube when I dream at night, youtube in the + middle of the day, youtube you consume my life, + youtube + You, Tube, (A, Love, Song), Original, Song, + Acoustic, Version + + + Music + + + + + + + + + + + + + + + http://gdata.youtube.com/feeds/videos/uWVuAl_aFRo + 2007-07-13T06:28:11.000Z + 2007-07-13T06:28:11.000Z + + + + + + + + + + + + "Beautiful Girls" - Sean Kingston - Acoustic + Cover + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=uWVuAl_aFRo"><img + alt="" + src="http://img.youtube.com/vi/uWVuAl_aFRo/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=uWVuAl_aFRo">&quot;Beautiful + Girls&quot; - Sean Kingston - Acoustic Cover</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Click Link to Subscribe! + http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic I really like this song + so I covered it. I will not smile for you + :)</span></div></td> <td style="font-size: + 11px; line-height: 1.4em; padding-left: 20px; padding-top: + 1px;" width="146" valign="top"><div><span + style="color: #666666; font-size: 11px;">From:</span> + <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 124571</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">1201 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">04:23</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + "Beautiful Girls" - Sean Kingston - + Acoustic Cover + Click Link to Subscribe! + http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic I really like this song + so I covered it. I will not smile for you + :) + davidchoimusic, beautiful, girls, sean, + kingston, acoustic, cover, video, suicidal + + + Music + + + + + + + + + + + + + + + http://gdata.youtube.com/feeds/videos/_PCgDBIgPbo + 2007-02-15T20:40:24.000Z + 2007-02-15T20:40:24.000Z + + + + + + + + Vlog - "That Girl" - Guitar Chords + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=_PCgDBIgPbo"><img + alt="" + src="http://img.youtube.com/vi/_PCgDBIgPbo/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=_PCgDBIgPbo">Vlog - + &quot;That Girl&quot; - Guitar Chords</a> + <br></div> <div style="font-size: 12px; margin: + 3px 0px;"><span>Vlog - &quot;That Girl&quot; - + Guitar Chords Finally here! Enjoy! + http://www.myspace.com/davidchoimusic + http://www.broadjam.com/davidchoi</span></div></td> + <td style="font-size: 11px; line-height: 1.4em; + padding-left: 20px; padding-top: 1px;" width="146" + valign="top"><div><span style="color: #666666; + font-size: 11px;">From:</span> <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 76681</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">384 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">05:38</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + Vlog - "That Girl" - Guitar + Chords + Vlog - "That Girl" - Guitar + Chords Finally here! Enjoy! + http://www.myspace.com/davidchoimusic + http://www.broadjam.com/davidchoi + Vlog, That, Girl, Guitar, + Chords + + + Music + + + + + + + + + + + + + + + http://gdata.youtube.com/feeds/videos/DdGyPZ0v7Ng + 2007-08-12T00:59:18.000Z + 2007-08-12T00:59:18.000Z + + + + + + + + + + + + + Beat Making with David Choi + <div style="color: #000000;font-family: + Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; + width: 555px;"><table cellspacing="0" cellpadding="0" + border="0"><tbody><tr><td width="140" + valign="top" rowspan="2"><div style="border: 1px solid + #999999; margin: 0px 10px 5px 0px;"><a + href="http://www.youtube.com/watch?v=DdGyPZ0v7Ng"><img + alt="" + src="http://img.youtube.com/vi/DdGyPZ0v7Ng/2.jpg"></a></div></td> + <td width="256" valign="top"><div style="font-size: + 12px; font-weight: bold;"><a style="font-size: 15px; + font-weight: bold; font-decoration: none;" + href="http://www.youtube.com/watch?v=DdGyPZ0v7Ng">Beat + Making with David Choi</a> <br></div> <div + style="font-size: 12px; margin: 3px 0px;"><span>Click + Link to Subscribe! + http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic Just a quick little beat + I made to show you guys the general idea behind beat making. + And yes, the skin is real + :)</span></div></td> <td style="font-size: + 11px; line-height: 1.4em; padding-left: 20px; padding-top: + 1px;" width="146" valign="top"><div><span + style="color: #666666; font-size: 11px;">From:</span> + <a + href="http://www.youtube.com/profile?user=davidchoimusic">davidchoimusic</a></div> + <div><span style="color: #666666; font-size: + 11px;">Views:</span> 22559</div> <div + style="white-space: nowrap;text-align: left"><img + style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> + <img style="border: 0px none; margin: 0px; padding: 0px; + vertical-align: middle; font-size: 11px;" align="top" alt="" + src="http://gdata.youtube.com/static/images/icn_star_half_11x11.gif"></div> + <div style="font-size: 11px;">371 <span style="color: + #666666; font-size: + 11px;">ratings</span></div></td></tr> + <tr><td><span style="color: #666666; font-size: + 11px;">Time:</span> <span style="color: #000000; + font-size: 11px; font-weight: + bold;">09:51</span></td> <td + style="font-size: 11px; padding-left: 20px;"><span + style="color: #666666; font-size: 11px;">More + in</span> <a + href="http://www.youtube.com/categories_portal?c=10">Music</a></td></tr></tbody></table></div> + + + + + + davidchoimusic + + http://gdata.youtube.com/feeds/users/davidchoimusic + + + Beat Making with David + Choi + Click Link to Subscribe! + http://www.youtube.com/subscription_center?add_user=davidchoimusic + http://www.myspace.com/davidchoimusic Just a quick little + beat I made to show you guys the general idea behind beat + making. And yes, the skin is real :) + how, to, Beat, Making, with, David, Choi, + davidchoimusic, pro, tools + + + Music + + + + + + + + + + + + + + -- cgit v1.2.3