]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - tests/ActivityParseTests.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / tests / ActivityParseTests.php
index fec8829ebad4ca60080b7e7a738aacfdcc8b73e5..27b751b75e92ceb78ff225fbca79d72d525a6f7f 100644 (file)
@@ -8,7 +8,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
 // XXX: we should probably have some common source for this stuff
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
+define('GNUSOCIAL', true);
+define('STATUSNET', true);  // compatibility
 
 require_once INSTALLDIR . '/lib/common.php';
 
@@ -22,14 +23,26 @@ class ActivityParseTests extends PHPUnit_Framework_TestCase
 
         $this->assertFalse(empty($act));
 
-        $this->assertEquals($act->time, 1243860840);
-        $this->assertEquals($act->verb, ActivityVerb::POST);
+        $this->assertEquals(1243860840, $act->time);
+        $this->assertEquals(ActivityVerb::POST, $act->verb);
 
         $this->assertFalse(empty($act->objects[0]));
-        $this->assertEquals($act->objects[0]->title, 'Punctuation Changeset');
-        $this->assertEquals($act->objects[0]->type, 'http://versioncentral.example.org/activity/changeset');
-        $this->assertEquals($act->objects[0]->summary, 'Fixing punctuation because it makes it more readable.');
-        $this->assertEquals($act->objects[0]->id, 'tag:versioncentral.example.org,2009:/change/1643245');
+        $this->assertEquals('Punctuation Changeset', $act->objects[0]->title);
+        $this->assertEquals('http://versioncentral.example.org/activity/changeset', $act->objects[0]->type);
+        $this->assertEquals('Fixing punctuation because it makes it more readable.', $act->objects[0]->summary);
+        $this->assertEquals('tag:versioncentral.example.org,2009:/change/1643245', $act->objects[0]->id);
+    }
+
+    public function testExample2()
+    {
+        global $_example2;
+        $dom = DOMDocument::loadXML($_example2);
+        $act = new Activity($dom->documentElement);
+
+        $this->assertFalse(empty($act));
+        // Did we handle <content type="html"> correctly with a typical payload?
+        $this->assertEquals("<p>Geraldine posted a Photo on PhotoPanic</p>\n     " .
+                            "<img src=\"/geraldine/photo1.jpg\">", trim($act->content));
     }
 
     public function testExample3()
@@ -46,22 +59,22 @@ class ActivityParseTests extends PHPUnit_Framework_TestCase
         $act = new Activity($entry, $feed);
 
         $this->assertFalse(empty($act));
-        $this->assertEquals($act->time, 1071340202);
-        $this->assertEquals($act->link, 'http://example.org/2003/12/13/atom03.html');
+        $this->assertEquals(1071340202, $act->time);
+        $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->link);
 
         $this->assertEquals($act->verb, ActivityVerb::POST);
 
         $this->assertFalse(empty($act->actor));
-        $this->assertEquals($act->actor->type, ActivityObject::PERSON);
-        $this->assertEquals($act->actor->title, 'John Doe');
-        $this->assertEquals($act->actor->id, 'mailto:johndoe@example.com');
+        $this->assertEquals(ActivityObject::PERSON, $act->actor->type);
+        $this->assertEquals('John Doe', $act->actor->title);
+        $this->assertEquals('mailto:johndoe@example.com', $act->actor->id);
 
         $this->assertFalse(empty($act->objects[0]));
-        $this->assertEquals($act->objects[0]->type, ActivityObject::NOTE);
-        $this->assertEquals($act->objects[0]->id, 'urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a');
-        $this->assertEquals($act->objects[0]->title, 'Atom-Powered Robots Run Amok');
-        $this->assertEquals($act->objects[0]->summary, 'Some text.');
-        $this->assertEquals($act->objects[0]->link, 'http://example.org/2003/12/13/atom03.html');
+        $this->assertEquals(ActivityObject::NOTE, $act->objects[0]->type);
+        $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $act->objects[0]->id);
+        $this->assertEquals('Atom-Powered Robots Run Amok', $act->objects[0]->title);
+        $this->assertEquals('Some text.', $act->objects[0]->summary);
+        $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->objects[0]->link);
 
         $this->assertFalse(empty($act->context));
 
@@ -88,7 +101,7 @@ class ActivityParseTests extends PHPUnit_Framework_TestCase
         $this->assertEquals('http://example.net/notice/12', $act->context->replyToID);
         $this->assertEquals('http://example.net/notice/12', $act->context->replyToUrl);
         $this->assertEquals('http://example.net/conversation/11', $act->context->conversation);
-        $this->assertEquals(array('http://example.net/user/1'), $act->context->attention);
+        $this->assertEquals(array('http://example.net/user/1'), array_keys($act->context->attention));
 
         $this->assertFalse(empty($act->objects[0]));
         $this->assertEquals($act->objects[0]->content,
@@ -305,6 +318,116 @@ class ActivityParseTests extends PHPUnit_Framework_TestCase
 
     }
 
+    public function testAtomContent()
+    {
+        $tests = array(array("<content>Some regular plain text.</content>",
+                             "Some regular plain text."),
+                       array("<content>&lt;b&gt;this is not HTML&lt;/b&gt;</content>",
+                             "&lt;b&gt;this is not HTML&lt;/b&gt;"),
+                       array("<content type='html'>Some regular plain HTML.</content>",
+                             "Some regular plain HTML."),
+                       array("<content type='html'>&lt;b&gt;this is too HTML&lt;/b&gt;</content>",
+                             "<b>this is too HTML</b>"),
+                       array("<content type='html'>&amp;lt;b&amp;gt;but this is not HTML!&amp;lt;/b&amp;gt;</content>",
+                             "&lt;b&gt;but this is not HTML!&lt;/b&gt;"),
+                       array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Some regular plain XHTML.</div></content>",
+                             "Some regular plain XHTML."),
+                       array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><b>This is some XHTML!</b></div></content>",
+                             "<b>This is some XHTML!</b>"),
+                       array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>&lt;b&gt;This is not some XHTML!&lt;/b&gt;</div></content>",
+                             "&lt;b&gt;This is not some XHTML!&lt;/b&gt;"),
+                       array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>&amp;lt;b&amp;gt;This is not some XHTML either!&amp;lt;/b&amp;gt;</div></content>",
+                             "&amp;lt;b&amp;gt;This is not some XHTML either!&amp;lt;/b&amp;gt;"));
+        foreach ($tests as $data) {
+            list($source, $output) = $data;
+            $xml = "<entry xmlns='http://www.w3.org/2005/Atom'>" .
+                   "<id>http://example.com/fakeid</id>" .
+                   "<author><name>Test</name></author>" .
+                   "<title>Atom content tests</title>" .
+                   $source .
+                   "</entry>";
+            $dom = DOMDocument::loadXML($xml);
+            $act = new Activity($dom->documentElement);
+
+            $this->assertFalse(empty($act));
+            $this->assertEquals($output, trim($act->content));
+        }
+    }
+
+    public function testRssContent()
+    {
+        $tests = array(array("<content:encoded>Some regular plain HTML.</content:encoded>",
+                             "Some regular plain HTML."),
+                       array("<content:encoded>Some &lt;b&gt;exciting bold HTML&lt;/b&gt;</content:encoded>",
+                             "Some <b>exciting bold HTML</b>"),
+                       array("<content:encoded>Some &amp;lt;b&amp;gt;escaped non-HTML.&amp;lt;/b&amp;gt;</content:encoded>",
+                             "Some &lt;b&gt;escaped non-HTML.&lt;/b&gt;"),
+                       array("<description>Some plain text.</description>",
+                             "Some plain text."),
+                       array("<description>Some &lt;b&gt;non-HTML text&lt;/b&gt;</description>",
+                             "Some &lt;b&gt;non-HTML text&lt;/b&gt;"),
+                       array("<description>Some &amp;lt;b&amp;gt;double-escaped text&amp;lt;/b&amp;gt;</description>",
+                             "Some &amp;lt;b&amp;gt;double-escaped text&amp;lt;/b&amp;gt;"));
+        foreach ($tests as $data) {
+            list($source, $output) = $data;
+            $xml = "<item xmlns:content='http://purl.org/rss/1.0/modules/content/'>" .
+                   "<guid>http://example.com/fakeid</guid>" .
+                   "<title>RSS content tests</title>" .
+                   $source .
+                   "</item>";
+            $dom = DOMDocument::loadXML($xml);
+            $act = new Activity($dom->documentElement);
+
+            $this->assertFalse(empty($act));
+            $this->assertEquals($output, trim($act->content));
+        }
+    }
+
+    public function testExample10()
+    {
+        global $_example10;
+        $dom = new DOMDocument();
+        $dom->loadXML($_example10);
+
+        // example 10 is a PuSH item of a post on a group feed, as generated
+        // by 0.9.7 code after migration away from <activity:actor> to <author>
+        $feed = $dom->documentElement;
+        $entry = $dom->getElementsByTagName('entry')->item(0);
+        $expected = 'http://lazarus.local/mublog/user/557';
+
+        // Reading just the entry alone should pick up its own <author>
+        // as the actor.
+        $act = new Activity($entry);
+        $this->assertEquals($act->actor->id, $expected);
+
+        // Reading the entry in feed context used to be buggy, picking up
+        // the feed's <activity:subject> which referred to the group.
+        // It should now be returning the expected author entry...
+        $act = new Activity($entry, $feed);
+        $this->assertEquals($act->actor->id, $expected);
+    }
+
+    public function testBookmarkRelated()
+    {
+        global $_example11;
+        $dom = new DOMDocument();
+        $dom->loadXML($_example11);
+
+        $feed = $dom->documentElement;
+        $entry = $dom->getElementsByTagName('entry')->item(0);
+
+        $expected = 'http://blog.teambox.com/open-source-companies';
+
+        $links = ActivityUtils::getLinks($entry, 'related');
+
+        $this->assertFalse(empty($links));
+        $this->assertTrue(is_array($links));
+        $this->assertEquals(count($links), 1);
+
+        $url = $links[0]->getAttribute('href');
+
+        $this->assertEquals($url, $expected);
+    }
 }
 
 $_example1 = <<<EXAMPLE1
@@ -410,7 +533,7 @@ $_example4 = <<<EXAMPLE4
  <link rel="related" href="http://example.net/notice/12"/>
  <thr:in-reply-to ref="http://example.net/notice/12" href="http://example.net/notice/12"></thr:in-reply-to>
  <link rel="ostatus:conversation" href="http://example.net/conversation/11"/>
- <link rel="ostatus:attention" href="http://example.net/user/1"/>
+ <link rel="mentioned" href="http://example.net/user/1"/>
  <content type="html">@&lt;span class=&quot;vcard&quot;&gt;&lt;a href=&quot;http://example.net/user/1&quot; class=&quot;url&quot;&gt;&lt;span class=&quot;fn nickname&quot;&gt;evan&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; now is the time for all good men to come to the aid of their country. #&lt;span class=&quot;tag&quot;&gt;&lt;a href=&quot;http://example.net/tag/thetime&quot; rel=&quot;tag&quot;&gt;thetime&lt;/a&gt;&lt;/span&gt;</content>
  <category term="thetime"></category>
 </entry>
@@ -715,3 +838,179 @@ $_example9 = <<<EXAMPLE9
     </entry>
 </feed>
 EXAMPLE9;
+
+// Sample PuSH entry from a group feed in 0.9.7
+// Old <activity:actor> has been removed from entries in this version.
+// A bug in the order of input processing meant that we were incorrectly
+// reading the feed's <activity:subject> instead of the entry's <author>,
+// causing the entry to get rejected as malformed (groups can't post on
+// their own; we want to see the actual author's info here).
+$_example10 = <<<EXAMPLE10
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
+ <generator uri="http://status.net" version="0.9.7alpha1">StatusNet</generator>
+ <id>http://lazarus.local/mublog/api/statusnet/groups/timeline/22.atom</id>
+ <title>grouptest316173 timeline</title>
+ <subtitle>Updates from grouptest316173 on Blaguette!</subtitle>
+ <logo>http://lazarus.local/mublog/theme/default/default-avatar-profile.png</logo>
+ <updated>2011-01-06T22:44:18+00:00</updated>
+<author>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/group</activity:object-type>
+ <uri>http://lazarus.local/mublog/group/22/id</uri>
+ <name>grouptest316173</name>
+ <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/group/22/id"/>
+ <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
+ <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
+ <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
+ <poco:preferredUsername>grouptest316173</poco:preferredUsername>
+ <poco:displayName>grouptest316173</poco:displayName>
+</author>
+<activity:subject>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/group</activity:object-type>
+ <id>http://lazarus.local/mublog/group/22/id</id>
+ <title>grouptest316173</title>
+ <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/group/22/id"/>
+ <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
+ <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
+ <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
+ <poco:preferredUsername>grouptest316173</poco:preferredUsername>
+ <poco:displayName>grouptest316173</poco:displayName>
+</activity:subject>
+ <link href="http://lazarus.local/mublog/group/grouptest316173" rel="alternate" type="text/html"/>
+ <link href="http://lazarus.local/mublog/main/push/hub" rel="hub"/>
+ <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="salmon"/>
+ <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="http://salmon-protocol.org/ns/salmon-replies"/>
+ <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="http://salmon-protocol.org/ns/salmon-mention"/>
+ <link href="http://lazarus.local/mublog/api/statusnet/groups/timeline/22.atom" rel="self" type="application/atom+xml"/>
+ <statusnet:group_info member_count="2"></statusnet:group_info>
+<entry>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
+ <id>http://lazarus.local/mublog/notice/1243</id>
+ <title>Group post from local to !grouptest316173, should go out over push.</title>
+ <content type="html">Group post from local to !&lt;span class=&quot;vcard&quot;&gt;&lt;a href=&quot;http://lazarus.local/mublog/group/22/id&quot; class=&quot;url&quot;&gt;&lt;span class=&quot;fn nickname&quot;&gt;grouptest316173&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;, should go out over push.</content>
+ <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/notice/1243"/>
+ <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
+ <published>2011-01-06T22:44:18+00:00</published>
+ <updated>2011-01-06T22:44:18+00:00</updated>
+ <author>
+  <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+  <uri>http://lazarus.local/mublog/user/557</uri>
+  <name>Pubtest316173 Smith</name>
+  <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/pubtest316173"/>
+  <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
+  <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
+  <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
+  <poco:preferredUsername>pubtest316173</poco:preferredUsername>
+  <poco:displayName>Pubtest316173 Smith</poco:displayName>
+  <poco:note>Stub account for OStatus tests.</poco:note>
+  <poco:urls>
+   <poco:type>homepage</poco:type>
+   <poco:value>http://example.org/pubtest316173</poco:value>
+   <poco:primary>true</poco:primary>
+  </poco:urls>
+ </author>
+ <link rel="ostatus:conversation" href="http://lazarus.local/mublog/conversation/1131"/>
+ <link rel="mentioned" href="http://lazarus.local/mublog/group/22/id"/>
+ <category term="grouptest316173"></category>
+ <source>
+  <id>http://lazarus.local/mublog/api/statuses/user_timeline/557.atom</id>
+  <title>Pubtest316173 Smith</title>
+  <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/pubtest316173"/>
+  <link rel="self" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/user_timeline/557.atom"/>
+  <link rel="license" href="http://creativecommons.org/licenses/by/3.0/"/>
+  <icon>http://lazarus.local/mublog/theme/default/default-avatar-profile.png</icon>
+  <updated>2011-01-06T22:44:18+00:00</updated>
+ </source>
+ <link rel="self" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/show/1243.atom"/>
+ <link rel="edit" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/show/1243.atom"/>
+ <statusnet:notice_info local_id="1243" source="api"></statusnet:notice_info>
+</entry>
+</feed>
+EXAMPLE10;
+
+$_example11 = <<<EXAMPLE11
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/">
+ <generator uri="http://status.net" version="0.9.7">StatusNet</generator>
+ <id>http://freelish.us/api/statuses/user_timeline/1.atom</id>
+ <title>demon timeline</title>
+ <subtitle>Updates from demon on freelish.us!</subtitle>
+ <logo>http://avatar.status.net/f/freelishus/1-96-20110331163048.jpeg</logo>
+ <updated>2011-05-30T09:36:03-04:00</updated>
+<author>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <uri>http://freelishus.status.net/user/1</uri>
+ <name>demon</name>
+ <link rel="alternate" type="text/html" href="http://freelish.us/demon"/>
+ <link rel="avatar" type="image/jpeg" media:width="192" media:height="192" href="http://avatar.status.net/f/freelishus/1-192-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="http://avatar.status.net/f/freelishus/1-96-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="http://avatar.status.net/f/freelishus/1-48-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="http://avatar.status.net/f/freelishus/1-24-20110331163049.jpeg"/>
+ <georss:point>45.50884 -73.58781</georss:point>
+ <poco:preferredUsername>demon</poco:preferredUsername>
+ <poco:displayName>Evan Prodromou</poco:displayName>
+ <poco:note>Montreal hacker and entrepreneur.</poco:note>
+ <poco:address>
+  <poco:formatted>Montreal, Quebec</poco:formatted>
+
+</poco:address>
+ <poco:urls>
+  <poco:type>homepage</poco:type>
+  <poco:value>http://evan.status.net/</poco:value>
+  <poco:primary>true</poco:primary>
+</poco:urls>
+ <statusnet:profile_info local_id="1"></statusnet:profile_info>
+</author>
+<!--Deprecation warning: activity:subject is present only for backward compatibility. It will be removed in the next version of StatusNet.-->
+<activity:subject>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <id>http://freelishus.status.net/user/1</id>
+ <title>Evan Prodromou</title>
+ <link rel="alternate" type="text/html" href="http://freelish.us/demon"/>
+ <link rel="avatar" type="image/jpeg" media:width="192" media:height="192" href="http://avatar.status.net/f/freelishus/1-192-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="http://avatar.status.net/f/freelishus/1-96-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="http://avatar.status.net/f/freelishus/1-48-20110331163048.jpeg"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="http://avatar.status.net/f/freelishus/1-24-20110331163049.jpeg"/>
+ <georss:point>45.50884 -73.58781</georss:point>
+ <poco:preferredUsername>demon</poco:preferredUsername>
+ <poco:displayName>Evan Prodromou</poco:displayName>
+ <poco:note>Montreal hacker and entrepreneur.</poco:note>
+ <poco:address>
+  <poco:formatted>Montreal, Quebec</poco:formatted>
+
+</poco:address>
+ <poco:urls>
+  <poco:type>homepage</poco:type>
+  <poco:value>http://evan.status.net/</poco:value>
+  <poco:primary>true</poco:primary>
+</poco:urls>
+ <statusnet:profile_info local_id="1"></statusnet:profile_info>
+</activity:subject>
+ <link href="http://freelish.us/demon" rel="alternate" type="text/html"/>
+ <link href="http://freelish.us/main/sup#1" rel="http://api.friendfeed.com/2008/03#sup" type="application/json"/>
+ <link href="http://freelish.us/api/statuses/user_timeline/1.atom?max_id=13210408" rel="next" type="application/atom+xml"/>
+ <link href="http://freelish.us/main/push/hub" rel="hub"/>
+ <link href="http://freelish.us/main/salmon/user/1" rel="salmon"/>
+ <link href="http://freelish.us/main/salmon/user/1" rel="http://salmon-protocol.org/ns/salmon-replies"/>
+ <link href="http://freelish.us/main/salmon/user/1" rel="http://salmon-protocol.org/ns/salmon-mention"/>
+ <link href="http://freelish.us/api/statuses/user_timeline/1.atom" rel="self" type="application/atom+xml"/>
+
+<entry>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/bookmark</activity:object-type>
+ <id>http://freelish.us/bookmark/9e930c3e-7ed9-47de-aba5-df6c60cec542</id>
+ <title>Why you should build an open-source startup | Teambox Blog</title>
+ <link rel="alternate" type="text/html" href="http://freelish.us/bookmark/9e930c3e-7ed9-47de-aba5-df6c60cec542"/>
+ <link rel="related" href="http://blog.teambox.com/open-source-companies"/>
+ <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
+ <published>2011-05-26T20:36:25+00:00</published>
+ <updated>2011-05-26T20:36:25+00:00</updated>
+ <link rel="ostatus:conversation" href="http://freelish.us/conversation/13835232"/>
+ <category term="opensource"></category>
+ <category term="startup"></category>
+ <link rel="self" type="application/atom+xml" href="http://freelish.us/api/statuses/show/13836862.atom"/>
+ <link rel="edit" type="application/atom+xml" href="http://freelish.us/api/statuses/show/13836862.atom"/>
+ <statusnet:notice_info local_id="13836862" source="web" favorite="false" repeated="false"></statusnet:notice_info>
+
+</entry>
+</feed>
+EXAMPLE11;