]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - tests/ActivityParseTests.php
Merge remote branch 'gitorious/testing' into testing
[quix0rs-gnu-social.git] / tests / ActivityParseTests.php
1 <?php
2
3 if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
4     print "This script must be run from the command line\n";
5     exit();
6 }
7
8 // XXX: we should probably have some common source for this stuff
9
10 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
11 define('STATUSNET', true);
12
13 require_once INSTALLDIR . '/lib/common.php';
14
15 class ActivityParseTests extends PHPUnit_Framework_TestCase
16 {
17     public function testExample1()
18     {
19         global $_example1;
20         $dom = DOMDocument::loadXML($_example1);
21         $act = new Activity($dom->documentElement);
22
23         $this->assertFalse(empty($act));
24
25         $this->assertEquals(1243860840, $act->time);
26         $this->assertEquals(ActivityVerb::POST, $act->verb);
27
28         $this->assertFalse(empty($act->objects[0]));
29         $this->assertEquals('Punctuation Changeset', $act->objects[0]->title);
30         $this->assertEquals('http://versioncentral.example.org/activity/changeset', $act->objects[0]->type);
31         $this->assertEquals('Fixing punctuation because it makes it more readable.', $act->objects[0]->summary);
32         $this->assertEquals('tag:versioncentral.example.org,2009:/change/1643245', $act->objects[0]->id);
33     }
34
35     public function testExample2()
36     {
37         global $_example2;
38         $dom = DOMDocument::loadXML($_example2);
39         $act = new Activity($dom->documentElement);
40
41         $this->assertFalse(empty($act));
42         // Did we handle <content type="html"> correctly with a typical payload?
43         $this->assertEquals("<p>Geraldine posted a Photo on PhotoPanic</p>\n     " .
44                             "<img src=\"/geraldine/photo1.jpg\">", trim($act->content));
45     }
46
47     public function testExample3()
48     {
49         global $_example3;
50         $dom = DOMDocument::loadXML($_example3);
51
52         $feed = $dom->documentElement;
53
54         $entries = $feed->getElementsByTagName('entry');
55
56         $entry = $entries->item(0);
57
58         $act = new Activity($entry, $feed);
59
60         $this->assertFalse(empty($act));
61         $this->assertEquals(1071340202, $act->time);
62         $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->link);
63
64         $this->assertEquals($act->verb, ActivityVerb::POST);
65
66         $this->assertFalse(empty($act->actor));
67         $this->assertEquals(ActivityObject::PERSON, $act->actor->type);
68         $this->assertEquals('John Doe', $act->actor->title);
69         $this->assertEquals('mailto:johndoe@example.com', $act->actor->id);
70
71         $this->assertFalse(empty($act->objects[0]));
72         $this->assertEquals(ActivityObject::NOTE, $act->objects[0]->type);
73         $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $act->objects[0]->id);
74         $this->assertEquals('Atom-Powered Robots Run Amok', $act->objects[0]->title);
75         $this->assertEquals('Some text.', $act->objects[0]->summary);
76         $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->objects[0]->link);
77
78         $this->assertFalse(empty($act->context));
79
80         $this->assertTrue(empty($act->target));
81
82         $this->assertEquals($act->entry, $entry);
83         $this->assertEquals($act->feed, $feed);
84     }
85
86     public function testExample4()
87     {
88         global $_example4;
89         $dom = DOMDocument::loadXML($_example4);
90
91         $entry = $dom->documentElement;
92
93         $act = new Activity($entry);
94
95         $this->assertFalse(empty($act));
96         $this->assertEquals(1266547958, $act->time);
97         $this->assertEquals('http://example.net/notice/14', $act->link);
98
99         $this->assertFalse(empty($act->context));
100         $this->assertEquals('http://example.net/notice/12', $act->context->replyToID);
101         $this->assertEquals('http://example.net/notice/12', $act->context->replyToUrl);
102         $this->assertEquals('http://example.net/conversation/11', $act->context->conversation);
103         $this->assertEquals(array('http://example.net/user/1'), $act->context->attention);
104
105         $this->assertFalse(empty($act->objects[0]));
106         $this->assertEquals($act->objects[0]->content,
107                             '@<span class="vcard"><a href="http://example.net/user/1" class="url"><span class="fn nickname">evan</span></a></span> now is the time for all good men to come to the aid of their country. #<span class="tag"><a href="http://example.net/tag/thetime" rel="tag">thetime</a></span>');
108
109         $this->assertFalse(empty($act->actor));
110     }
111
112     public function testExample5()
113     {
114         global $_example5;
115         $dom = DOMDocument::loadXML($_example5);
116
117         $feed = $dom->documentElement;
118
119         // @todo Test feed elements
120
121         $entries = $feed->getElementsByTagName('entry');
122         $entry = $entries->item(0);
123
124         $act = new Activity($entry, $feed);
125
126         // Post
127         $this->assertEquals($act->verb, ActivityVerb::POST);
128         $this->assertFalse(empty($act->context));
129
130         // Actor w/Portable Contacts stuff
131         $this->assertFalse(empty($act->actor));
132         $this->assertEquals($act->actor->type, ActivityObject::PERSON);
133         $this->assertEquals($act->actor->title, 'Test User');
134         $this->assertEquals($act->actor->id, 'http://example.net/mysite/user/3');
135         $this->assertEquals($act->actor->link, 'http://example.net/mysite/testuser');
136
137         $avatars = $act->actor->avatarLinks;
138
139         $this->assertEquals(
140                 $avatars[0]->url,
141                 'http://example.net/mysite/avatar/3-96-20100224004207.jpeg'
142         );
143
144         $this->assertEquals($act->actor->displayName, 'Test User');
145
146         $poco = $act->actor->poco;
147         $this->assertEquals($poco->preferredUsername, 'testuser');
148         $this->assertEquals($poco->address->formatted, 'San Francisco, CA');
149         $this->assertEquals($poco->urls[0]->type, 'homepage');
150         $this->assertEquals($poco->urls[0]->value, 'http://example.com/blog.html');
151         $this->assertEquals($poco->urls[0]->primary, 'true');
152         $this->assertEquals($act->actor->geopoint, '37.7749295 -122.4194155');
153     }
154
155     public function testExample6()
156     {
157         global $_example6;
158
159         $dom = DOMDocument::loadXML($_example6);
160
161         $rss = $dom->documentElement;
162
163         $channels = $dom->getElementsByTagName('channel');
164
165         $channel = $channels->item(0);
166
167         $items = $channel->getElementsByTagName('item');
168
169         $item = $items->item(0);
170
171         $act = new Activity($item, $channel);
172
173         $this->assertEquals($act->verb, ActivityVerb::POST);
174
175         $this->assertEquals($act->id, 'http://en.blog.wordpress.com/?p=3857');
176         $this->assertEquals($act->link, 'http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/');
177         $this->assertEquals($act->title, 'Rub-a-Dub-Dub in the PubSubHubbub');
178         $this->assertEquals($act->time, 1267634892);
179
180         $actor = $act->actor;
181
182         $this->assertFalse(empty($actor));
183         $this->assertEquals($actor->title, "Joseph Scott");
184     }
185
186     public function testExample7()
187     {
188         global $_example7;
189
190         $dom = DOMDocument::loadXML($_example7);
191
192         $rss = $dom->documentElement;
193
194         $channels = $dom->getElementsByTagName('channel');
195
196         $channel = $channels->item(0);
197
198         $items = $channel->getElementsByTagName('item');
199
200         $item = $items->item(0);
201
202         $act = new Activity($item, $channel);
203
204         $this->assertEquals(ActivityVerb::POST, $act->verb);
205         $this->assertEquals('http://evanpro.posterous.com/checking-out-captain-bones', $act->link);
206         $this->assertEquals('http://evanpro.posterous.com/checking-out-captain-bones', $act->id);
207         $this->assertEquals('Checking out captain bones', $act->title);
208         $this->assertEquals(1269095551, $act->time);
209
210         $actor = $act->actor;
211
212         $this->assertEquals(ActivityObject::PERSON, $actor->type);
213         $this->assertEquals('http://posterous.com/people/3sDslhaepotz', $actor->id);
214         $this->assertEquals('Evan Prodromou', $actor->title);
215         $this->assertNull($actor->summary);
216         $this->assertNull($actor->content);
217         $this->assertEquals('http://posterous.com/people/3sDslhaepotz', $actor->link);
218         $this->assertNull($actor->source);
219         $this->assertTrue(is_array($actor->avatarLinks));
220         $this->assertEquals(1, count($actor->avatarLinks));
221         $this->assertEquals('http://files.posterous.com/user_profile_pics/480326/2009-08-05-142447.jpg',
222                             $actor->avatarLinks[0]->url);
223         $this->assertNotNull($actor->poco);
224         $this->assertEquals('evanpro', $actor->poco->preferredUsername);
225         $this->assertEquals('Evan Prodromou', $actor->poco->displayName);
226         $this->assertNull($actor->poco->note);
227         $this->assertNull($actor->poco->address);
228         $this->assertEquals(0, count($actor->poco->urls));
229     }
230
231     // Media test - cliqset
232     public function testExample8()
233     {
234         global $_example8;
235         $dom = DOMDocument::loadXML($_example8);
236
237         $feed = $dom->documentElement;
238
239         $entries = $feed->getElementsByTagName('entry');
240
241         $entry = $entries->item(0);
242
243         $act = new Activity($entry, $feed);
244
245         $this->assertFalse(empty($act));
246         $this->assertEquals($act->time, 1269221753);
247         $this->assertEquals($act->verb, ActivityVerb::POST);
248         $this->assertEquals($act->summary, 'zcopley posted 5 photos on Flickr');
249
250         $this->assertFalse(empty($act->objects));
251         $this->assertEquals(sizeof($act->objects), 5);
252
253         $this->assertEquals($act->objects[0]->type, ActivityObject::PHOTO);
254         $this->assertEquals($act->objects[0]->title, 'IMG_1368');
255         $this->assertNull($act->objects[0]->description);
256         $this->assertEquals(
257             $act->objects[0]->thumbnail,
258             'http://media.cliqset.com/6f6fbee9d7dfbffc73b6ef626275eb5f_thumb.jpg'
259         );
260         $this->assertEquals(
261             $act->objects[0]->link,
262             'http://www.flickr.com/photos/zcopley/4452933806/'
263         );
264
265         $this->assertEquals($act->objects[1]->type, ActivityObject::PHOTO);
266         $this->assertEquals($act->objects[1]->title, 'IMG_1365');
267         $this->assertNull($act->objects[1]->description);
268         $this->assertEquals(
269             $act->objects[1]->thumbnail,
270             'http://media.cliqset.com/b8f3932cd0bba1b27f7c8b3ef986915e_thumb.jpg'
271         );
272         $this->assertEquals(
273             $act->objects[1]->link,
274             'http://www.flickr.com/photos/zcopley/4442630390/'
275         );
276
277         $this->assertEquals($act->objects[2]->type, ActivityObject::PHOTO);
278         $this->assertEquals($act->objects[2]->title, 'Classic');
279         $this->assertEquals(
280             $act->objects[2]->description,
281             '-Powered by pikchur.com/n0u'
282         );
283         $this->assertEquals(
284             $act->objects[2]->thumbnail,
285             'http://media.cliqset.com/fc54c15f850b7a9a8efa644087a48c91_thumb.jpg'
286         );
287         $this->assertEquals(
288             $act->objects[2]->link,
289             'http://www.flickr.com/photos/zcopley/4430754103/'
290         );
291
292         $this->assertEquals($act->objects[3]->type, ActivityObject::PHOTO);
293         $this->assertEquals($act->objects[3]->title, 'IMG_1363');
294         $this->assertNull($act->objects[3]->description);
295
296         $this->assertEquals(
297             $act->objects[3]->thumbnail,
298             'http://media.cliqset.com/4b1d307c9217e2114391a8b229d612cb_thumb.jpg'
299         );
300         $this->assertEquals(
301             $act->objects[3]->link,
302             'http://www.flickr.com/photos/zcopley/4416969717/'
303         );
304
305         $this->assertEquals($act->objects[4]->type, ActivityObject::PHOTO);
306         $this->assertEquals($act->objects[4]->title, 'IMG_1361');
307         $this->assertNull($act->objects[4]->description);
308
309         $this->assertEquals(
310             $act->objects[4]->thumbnail,
311             'http://media.cliqset.com/23d9b4b96b286e0347d36052f22f6e60_thumb.jpg'
312         );
313         $this->assertEquals(
314             $act->objects[4]->link,
315             'http://www.flickr.com/photos/zcopley/4417734232/'
316         );
317
318     }
319
320     public function testAtomContent()
321     {
322         $tests = array(array("<content>Some regular plain text.</content>",
323                              "Some regular plain text."),
324                        array("<content>&lt;b&gt;this is not HTML&lt;/b&gt;</content>",
325                              "&lt;b&gt;this is not HTML&lt;/b&gt;"),
326                        array("<content type='html'>Some regular plain HTML.</content>",
327                              "Some regular plain HTML."),
328                        array("<content type='html'>&lt;b&gt;this is too HTML&lt;/b&gt;</content>",
329                              "<b>this is too HTML</b>"),
330                        array("<content type='html'>&amp;lt;b&amp;gt;but this is not HTML!&amp;lt;/b&amp;gt;</content>",
331                              "&lt;b&gt;but this is not HTML!&lt;/b&gt;"),
332                        array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Some regular plain XHTML.</div></content>",
333                              "Some regular plain XHTML."),
334                        array("<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><b>This is some XHTML!</b></div></content>",
335                              "<b>This is some XHTML!</b>"),
336                        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>",
337                              "&lt;b&gt;This is not some XHTML!&lt;/b&gt;"),
338                        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>",
339                              "&amp;lt;b&amp;gt;This is not some XHTML either!&amp;lt;/b&amp;gt;"));
340         foreach ($tests as $data) {
341             list($source, $output) = $data;
342             $xml = "<entry xmlns='http://www.w3.org/2005/Atom'>" .
343                    "<id>http://example.com/fakeid</id>" .
344                    "<author><name>Test</name></author>" .
345                    "<title>Atom content tests</title>" .
346                    $source .
347                    "</entry>";
348             $dom = DOMDocument::loadXML($xml);
349             $act = new Activity($dom->documentElement);
350
351             $this->assertFalse(empty($act));
352             $this->assertEquals($output, trim($act->content));
353         }
354     }
355
356     public function testRssContent()
357     {
358         $tests = array(array("<content:encoded>Some regular plain HTML.</content:encoded>",
359                              "Some regular plain HTML."),
360                        array("<content:encoded>Some &lt;b&gt;exciting bold HTML&lt;/b&gt;</content:encoded>",
361                              "Some <b>exciting bold HTML</b>"),
362                        array("<content:encoded>Some &amp;lt;b&amp;gt;escaped non-HTML.&amp;lt;/b&amp;gt;</content:encoded>",
363                              "Some &lt;b&gt;escaped non-HTML.&lt;/b&gt;"),
364                        array("<description>Some plain text.</description>",
365                              "Some plain text."),
366                        array("<description>Some &lt;b&gt;non-HTML text&lt;/b&gt;</description>",
367                              "Some &lt;b&gt;non-HTML text&lt;/b&gt;"),
368                        array("<description>Some &amp;lt;b&amp;gt;double-escaped text&amp;lt;/b&amp;gt;</description>",
369                              "Some &amp;lt;b&amp;gt;double-escaped text&amp;lt;/b&amp;gt;"));
370         foreach ($tests as $data) {
371             list($source, $output) = $data;
372             $xml = "<item xmlns:content='http://purl.org/rss/1.0/modules/content/'>" .
373                    "<guid>http://example.com/fakeid</guid>" .
374                    "<title>RSS content tests</title>" .
375                    $source .
376                    "</item>";
377             $dom = DOMDocument::loadXML($xml);
378             $act = new Activity($dom->documentElement);
379
380             $this->assertFalse(empty($act));
381             $this->assertEquals($output, trim($act->content));
382         }
383     }
384
385     public function testExample10()
386     {
387         global $_example10;
388         $dom = new DOMDocument();
389         $dom->loadXML($_example10);
390
391         // example 10 is a PuSH item of a post on a group feed, as generated
392         // by 0.9.7 code after migration away from <activity:actor> to <author>
393         $feed = $dom->documentElement;
394         $entry = $dom->getElementsByTagName('entry')->item(0);
395         $expected = 'http://lazarus.local/mublog/user/557';
396
397         // Reading just the entry alone should pick up its own <author>
398         // as the actor.
399         $act = new Activity($entry);
400         $this->assertEquals($act->actor->id, $expected);
401
402         // Reading the entry in feed context used to be buggy, picking up
403         // the feed's <activity:subject> which referred to the group.
404         // It should now be returning the expected author entry...
405         $act = new Activity($entry, $feed);
406         $this->assertEquals($act->actor->id, $expected);
407     }
408 }
409
410 $_example1 = <<<EXAMPLE1
411 <?xml version='1.0' encoding='UTF-8'?>
412 <entry xmlns='http://www.w3.org/2005/Atom' xmlns:activity='http://activitystrea.ms/spec/1.0/'>
413   <id>tag:versioncentral.example.org,2009:/commit/1643245</id>
414   <published>2009-06-01T12:54:00Z</published>
415   <title>Geraldine committed a change to yate</title>
416   <content type="xhtml">Geraldine just committed a change to yate on VersionCentral</content>
417   <link rel="alternate" type="text/html"
418         href="http://versioncentral.example.org/geraldine/yate/commit/1643245" />
419   <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
420   <activity:verb>http://versioncentral.example.org/activity/commit</activity:verb>
421   <activity:object>
422     <activity:object-type>http://versioncentral.example.org/activity/changeset</activity:object-type>
423     <id>tag:versioncentral.example.org,2009:/change/1643245</id>
424     <title>Punctuation Changeset</title>
425     <summary>Fixing punctuation because it makes it more readable.</summary>
426     <link rel="alternate" type="text/html" href="..." />
427   </activity:object>
428 </entry>
429 EXAMPLE1;
430
431 $_example2 = <<<EXAMPLE2
432 <?xml version='1.0' encoding='UTF-8'?>
433 <entry xmlns='http://www.w3.org/2005/Atom' xmlns:activity='http://activitystrea.ms/spec/1.0/'>
434   <id>tag:photopanic.example.com,2008:activity01</id>
435   <title>Geraldine posted a Photo on PhotoPanic</title>
436   <published>2008-11-02T15:29:00Z</published>
437   <link rel="alternate" type="text/html" href="/geraldine/activities/1" />
438   <activity:verb>
439   http://activitystrea.ms/schema/1.0/post
440   </activity:verb>
441   <activity:object>
442     <id>tag:photopanic.example.com,2008:photo01</id>
443     <title>My Cat</title>
444     <published>2008-11-02T15:29:00Z</published>
445     <link rel="alternate" type="text/html" href="/geraldine/photos/1" />
446     <activity:object-type>
447       tag:atomactivity.example.com,2008:photo
448     </activity:object-type>
449     <source>
450       <title>Geraldine's Photos</title>
451       <link rel="self" type="application/atom+xml" href="/geraldine/photofeed.xml" />
452       <link rel="alternate" type="text/html" href="/geraldine/" />
453     </source>
454   </activity:object>
455   <content type="html">
456      &lt;p&gt;Geraldine posted a Photo on PhotoPanic&lt;/p&gt;
457      &lt;img src="/geraldine/photo1.jpg"&gt;
458   </content>
459 </entry>
460 EXAMPLE2;
461
462 $_example3 = <<<EXAMPLE3
463 <?xml version="1.0" encoding="utf-8"?>
464
465 <feed xmlns="http://www.w3.org/2005/Atom">
466
467     <title>Example Feed</title>
468     <subtitle>A subtitle.</subtitle>
469     <link href="http://example.org/feed/" rel="self" />
470     <link href="http://example.org/" />
471     <id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
472     <updated>2003-12-13T18:30:02Z</updated>
473     <author>
474         <name>John Doe</name>
475         <email>johndoe@example.com</email>
476     </author>
477
478     <entry>
479         <title>Atom-Powered Robots Run Amok</title>
480         <link href="http://example.org/2003/12/13/atom03" />
481         <link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/>
482         <link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/>
483         <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
484         <updated>2003-12-13T18:30:02Z</updated>
485         <summary>Some text.</summary>
486     </entry>
487
488 </feed>
489 EXAMPLE3;
490
491 $_example4 = <<<EXAMPLE4
492 <?xml version='1.0' encoding='UTF-8'?>
493 <entry 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:ostatus="http://ostatus.org/schema/1.0">
494  <title>@evan now is the time for all good men to come to the aid of their country. #thetime</title>
495  <summary>@evan now is the time for all good men to come to the aid of their country. #thetime</summary>
496 <author>
497  <name>spock</name>
498  <uri>http://example.net/user/2</uri>
499 </author>
500 <activity:actor>
501  <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
502  <id>http://example.net/user/2</id>
503  <title>spock</title>
504  <link type="image/png" rel="avatar" href="http://example.net/theme/identica/default-avatar-profile.png"></link>
505 </activity:actor>
506  <link rel="alternate" type="text/html" href="http://example.net/notice/14"/>
507  <id>http://example.net/notice/14</id>
508  <published>2010-02-19T02:52:38+00:00</published>
509  <updated>2010-02-19T02:52:38+00:00</updated>
510  <link rel="related" href="http://example.net/notice/12"/>
511  <thr:in-reply-to ref="http://example.net/notice/12" href="http://example.net/notice/12"></thr:in-reply-to>
512  <link rel="ostatus:conversation" href="http://example.net/conversation/11"/>
513  <link rel="ostatus:attention" href="http://example.net/user/1"/>
514  <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>
515  <category term="thetime"></category>
516 </entry>
517 EXAMPLE4;
518
519 $_example5 = <<<EXAMPLE5
520 <?xml version="1.0" encoding="UTF-8"?>
521 <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:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0">
522  <id>3</id>
523  <title>testuser timeline</title>
524  <subtitle>Updates from testuser on Zach Dev!</subtitle>
525  <logo>http://example.net/mysite/avatar/3-96-20100224004207.jpeg</logo>
526  <updated>2010-02-24T06:38:49+00:00</updated>
527 <author>
528  <name>testuser</name>
529  <uri>http://example.net/mysite/user/3</uri>
530
531 </author>
532  <link href="http://example.net/mysite/testuser" rel="alternate" type="text/html"/>
533  <link href="http://example.net/mysite/api/statuses/user_timeline/3.atom" rel="self" type="application/atom+xml"/>
534  <link href="http://example.net/mysite/main/sup#3" rel="http://api.friendfeed.com/2008/03#sup" type="application/json"/>
535  <link href="http://example.net/mysite/main/push/hub" rel="hub"/>
536  <link href="http://example.net/mysite/main/salmon/user/3" rel="salmon"/>
537 <activity:subject>
538  <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
539  <id>http://example.net/mysite/user/3</id>
540  <title>Test User</title>
541  <link rel="alternate" type="text/html" href="http://example.net/mysite/testuser"/>
542  <link type="image/jpeg" rel="avatar" href="http://example.net/mysite/avatar/3-96-20100224004207.jpeg"/>
543  <georss:point>37.7749295 -122.4194155</georss:point>
544
545 <poco:preferredUsername>testuser</poco:preferredUsername>
546 <poco:displayName>Test User</poco:displayName>
547 <poco:note>Just another test user.</poco:note>
548 <poco:address>
549  <poco:formatted>San Francisco, CA</poco:formatted>
550 </poco:address>
551 <poco:urls>
552  <poco:type>homepage</poco:type>
553  <poco:value>http://example.com/blog.html</poco:value>
554  <poco:primary>true</poco:primary>
555
556 </poco:urls>
557 </activity:subject>
558 <entry>
559  <title>Hey man, is that Freedom Code?! #freedom #hippy</title>
560  <summary>Hey man, is that Freedom Code?! #freedom #hippy</summary>
561 <author>
562  <name>testuser</name>
563  <uri>http://example.net/mysite/user/3</uri>
564 </author>
565 <activity:actor>
566  <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
567  <id>http://example.net/mysite/user/3</id>
568  <title>Test User</title>
569  <link rel="alternate" type="text/html" href="http://example.net/mysite/testuser"/>
570  <link type="image/jpeg" rel="avatar" href="http://example.net/mysite/avatar/3-96-20100224004207.jpeg"/>
571  <georss:point>37.7749295 -122.4194155</georss:point>
572
573 <poco:preferredUsername>testuser</poco:preferredUsername>
574 <poco:displayName>Test User</poco:displayName>
575 <poco:note>Just another test user.</poco:note>
576 <poco:address>
577  <poco:formatted>San Francisco, CA</poco:formatted>
578 </poco:address>
579 <poco:urls>
580  <poco:type>homepage</poco:type>
581  <poco:value>http://example.com/blog.html</poco:value>
582  <poco:primary>true</poco:primary>
583
584 </poco:urls>
585 </activity:actor>
586  <link rel="alternate" type="text/html" href="http://example.net/mysite/notice/7"/>
587  <id>http://example.net/mysite/notice/7</id>
588  <published>2010-02-24T00:53:06+00:00</published>
589  <updated>2010-02-24T00:53:06+00:00</updated>
590  <link rel="ostatus:conversation" href="http://example.net/mysite/conversation/7"/>
591  <content type="html">Hey man, is that Freedom Code?! #&lt;span class=&quot;tag&quot;&gt;&lt;a href=&quot;http://example.net/mysite/tag/freedom&quot; rel=&quot;tag&quot;&gt;freedom&lt;/a&gt;&lt;/span&gt; #&lt;span class=&quot;tag&quot;&gt;&lt;a href=&quot;http://example.net/mysite/tag/hippy&quot; rel=&quot;tag&quot;&gt;hippy&lt;/a&gt;&lt;/span&gt;</content>
592  <georss:point>37.8313160 -122.2852473</georss:point>
593
594 </entry>
595 </feed>
596 EXAMPLE5;
597
598 $_example6 = <<<EXAMPLE6
599 <?xml version="1.0" encoding="UTF-8"?>
600 <rss version="2.0"
601         xmlns:content="http://purl.org/rss/1.0/modules/content/"
602         xmlns:wfw="http://wellformedweb.org/CommentAPI/"
603         xmlns:dc="http://purl.org/dc/elements/1.1/"
604         xmlns:atom="http://www.w3.org/2005/Atom"
605         xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
606         xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
607         xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
608         >
609
610         <channel>
611                 <title>WordPress.com News</title>
612                 <atom:link href="http://en.blog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
613                 <link>http://en.blog.wordpress.com</link>
614                 <description>The latest news on WordPress.com and the WordPress community.</description>
615                 <lastBuildDate>Thu, 18 Mar 2010 23:25:35 +0000</lastBuildDate>
616
617                 <generator>http://wordpress.com/</generator>
618                 <language>en</language>
619                 <sy:updatePeriod>hourly</sy:updatePeriod>
620                 <sy:updateFrequency>1</sy:updateFrequency>
621                 <cloud domain='en.blog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
622                 <image>
623                         <url>http://www.gravatar.com/blavatar/e6392390e3bcfadff3671c5a5653d95b?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
624                         <title>WordPress.com News</title>
625                         <link>http://en.blog.wordpress.com</link>
626                 </image>
627                 <atom:link rel="search" type="application/opensearchdescription+xml" href="http://en.blog.wordpress.com/osd.xml" title="WordPress.com News" />
628                 <atom:link rel='hub' href='http://en.blog.wordpress.com/?pushpress=hub'/>
629
630                 <item>
631                         <title>Rub-a-Dub-Dub in the PubSubHubbub</title>
632                         <link>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/</link>
633                         <comments>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/#comments</comments>
634                         <pubDate>Wed, 03 Mar 2010 16:48:12 +0000</pubDate>
635                         <dc:creator>Joseph Scott</dc:creator>
636
637                         <category><![CDATA[Feeds]]></category>
638                         <category><![CDATA[atom]]></category>
639                         <category><![CDATA[pubsubhubbub]]></category>
640                         <category><![CDATA[rss]]></category>
641
642                         <guid isPermaLink="false">http://en.blog.wordpress.com/?p=3857</guid>
643                         <description><![CDATA[From the tongue twisting name department we welcome PubSubHubbub, or as some people have shortened it to: PuSH.  Like rssCloud, PuSH is a way for services that subscribe to updates from your blog (think Google Reader, Bloglines or Netvibes) to get updates even faster.  In a nutshell, instead of having to periodically ask [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=en.blog.wordpress.com&blog=3584907&post=3857&subd=en.blog&ref=&feed=1" />]]></description>
644                                 <content:encoded><![CDATA[<p>From the tongue twisting name department we welcome <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a>, or as some people have shortened it to: PuSH.  Like <a href="http://en.blog.wordpress.com/2009/09/07/rss-in-the-clouds/">rssCloud</a>, PuSH is a way for services that subscribe to updates from your blog (think Google Reader, Bloglines or Netvibes) to get updates even faster.  In a nutshell, instead of having to periodically ask your blog if there are any updates they can now register to automatically receive updates each time you publish new content.  In most cases these updates are sent out within a second or two of when you hit the publish button.</p>
645         <p>Today we&#8217;ve turned on PuSH support for the more than 10.5 million blogs on WordPress.com.  There&#8217;s nothing to configure, it&#8217;s working right now behind the scenes to help others keep up to date with your posts.</p>
646         <p>For those using the WordPress.org software we are releasing a new PuSH plugin: <a href="http://wordpress.org/extend/plugins/pushpress/">PuSHPress</a>.  This plugin differs from the current PuSH related plugins by including a built-in hub.</p>
647         <p>For more PuSH related reading check out the <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub project site</a> and <a href="http://groups.google.com/group/pubsubhubbub?pli=1">Google Group</a>.  And if you really want to geek out there&#8217;s always the <a href="http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html">PubSubHubbub Spec</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
648         <br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/en.blog.wordpress.com/3857/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=en.blog.wordpress.com&blog=3584907&post=3857&subd=en.blog&ref=&feed=1" />]]></content:encoded>
649                                 <wfw:commentRss>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/feed/</wfw:commentRss>
650
651                         <slash:comments>96</slash:comments>
652
653                         <media:content url="http://1.gravatar.com/avatar/582b66ad5ae1b69c7601a990cb9a661a?s=96&#38;d=identicon" medium="image">
654                                 <media:title type="html">josephscott</media:title>
655                         </media:content>
656                 </item>
657         </channel>
658 </rss>
659 EXAMPLE6;
660
661 $_example7 = <<<EXAMPLE7
662 <?xml version="1.0" encoding="UTF-8"?>
663         <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:posterous="http://posterous.com/help/rss/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
664           <channel>
665             <title>evanpro's posterous</title>
666             <link>http://evanpro.posterous.com</link>
667             <description>Most recent posts at evanpro's posterous</description>
668             <generator>posterous.com</generator>
669             <link type="application/json" xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://posterous.com/api/sup_update#56bcc5eb7"/>
670             <atom:link rel="self" href="http://evanpro.posterous.com/rss.xml"/>
671             <atom:link rel="hub" href="http://posterous.superfeedr.com"/>
672             <item>
673               <pubDate>Sat, 20 Mar 2010 07:32:31 -0700</pubDate>
674               <title>Checking out captain bones</title>
675               <link>http://evanpro.posterous.com/checking-out-captain-bones</link>
676               <guid>http://evanpro.posterous.com/checking-out-captain-bones</guid>
677               <description>
678                 <![CDATA[<p>
679                 <p>Bones!</p>
680
681         </p>
682
683         <p><a href="http://evanpro.posterous.com/checking-out-captain-bones">Permalink</a>
684
685                 | <a href="http://evanpro.posterous.com/checking-out-captain-bones#comment">Leave a comment&nbsp;&nbsp;&raquo;</a>
686
687         </p>]]>
688               </description>
689               <posterous:author>
690                 <posterous:userImage>http://files.posterous.com/user_profile_pics/480326/2009-08-05-142447.jpg</posterous:userImage>
691                 <posterous:profileUrl>http://posterous.com/people/3sDslhaepotz</posterous:profileUrl>
692                 <posterous:firstName>Evan</posterous:firstName>
693                 <posterous:lastnNme>Prodromou</posterous:lastnNme>
694                 <posterous:nickName>evanpro</posterous:nickName>
695                 <posterous:displayName>Evan Prodromou</posterous:displayName>
696               </posterous:author>
697             </item>
698         </channel>
699 </rss>
700 EXAMPLE7;
701
702 $_example8 = <<<EXAMPLE8
703 <?xml version="1.0"?>
704 <feed xmlns="http://www.w3.org/2005/Atom">
705     <link href="http://pubsubhubbub.appspot.com/" rel="hub"/>
706     <title type="text">Activity Stream for: zcopley</title>
707     <id>http://cliqset.com/feed/atom?uid=zcopley</id>
708     <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
709         <thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total>
710         <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
711         <published>2010-03-22T01:35:53.000Z</published>
712         <service:provider>
713             <name>flickr</name>
714             <uri>http://flickr.com</uri>
715             <icon>http://cliqset-services.s3.amazonaws.com/flickr.png</icon>
716         </service:provider>
717         <activity:object>
718             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
719             <title type="text">IMG_1368</title>
720             <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/6f6fbee9d7dfbffc73b6ef626275eb5f_thumb.jpg"/>
721             <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4452933806/"/>
722         </activity:object>
723         <activity:object>
724             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
725             <title type="text">IMG_1365</title>
726             <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/b8f3932cd0bba1b27f7c8b3ef986915e_thumb.jpg"/>
727             <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4442630390/"/>
728         </activity:object>
729         <activity:object xmlns:media="http://purl.org/syndication/atommedia">
730             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
731             <title type="text">Classic</title>
732             <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/fc54c15f850b7a9a8efa644087a48c91_thumb.jpg"/>
733             <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4430754103/"/>
734             <media:description type="text">-Powered by pikchur.com/n0u</media:description>
735         </activity:object>
736         <activity:object>
737             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
738             <title type="text">IMG_1363</title>
739             <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/4b1d307c9217e2114391a8b229d612cb_thumb.jpg"/>
740             <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4416969717/"/>
741         </activity:object>
742         <activity:object>
743             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
744             <title type="text">IMG_1361</title>
745             <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/23d9b4b96b286e0347d36052f22f6e60_thumb.jpg"/>
746             <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4417734232/"/>
747         </activity:object>
748         <title type="text">zcopley posted some photos on Flickr</title>
749         <summary type="text">zcopley posted 5 photos on Flickr</summary>
750         <category scheme="http://schemas.cliqset.com/activity/categories/1.0" term="PhotoPosted" label="Photo Posted"/>
751         <updated>2010-03-22T20:46:42.778Z</updated>
752         <id>tag:cliqset.com,2010-03-22:/user/zcopley/SVgAZubGhtAnSAee</id>
753         <link href="http://cliqset.com/user/zcopley/SVgAZubGhtAnSAee" type="text/xhtml" rel="alternate" title="zcopley posted some photos on Flickr"/>
754         <author>
755             <name>zcopley</name>
756             <uri>http://cliqset.com/user/zcopley</uri>
757         </author>
758         <activity:actor xmlns:poco="http://portablecontacts.net/spec/1.0">
759             <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
760             <id>zcopley</id>
761             <poco:name>
762                 <poco:givenName>Zach</poco:givenName>
763                 <poco:familyName>Copley</poco:familyName>
764             </poco:name>
765             <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=80" media:height="80" media:width="80"/>
766             <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=120" media:height="120" media:width="120"/>
767             <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=200" media:height="200" media:width="200"/>
768         </activity:actor>
769     </entry>
770 </feed>
771 EXAMPLE8;
772
773 $_example9 = <<<EXAMPLE9
774 <?xml version="1.0" encoding="utf-8"?>
775 <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:media="http://search.yahoo.com/mrss" xmlns:activity="http://activitystrea.ms/spec/1.0/">
776     <link rel="self" type="application/atom+xml" href="http://buzz.googleapis.com/feeds/117848251937215158042/public/posted"/>
777     <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
778     <title type="text">Google Buzz</title>
779     <updated>2010-03-22T01:55:53.596Z</updated>
780     <id>tag:google.com,2009:buzz-feed/public/posted/117848251937215158042</id>
781     <generator>Google - Google Buzz</generator>
782     <entry>
783         <title type="html">Buzz by Zach Copley from Flickr</title>
784         <summary type="text">IMG_1366</summary>
785         <published>2010-03-18T04:29:23.000Z</published>
786         <updated>2010-03-18T05:14:03.325Z</updated>
787         <id>tag:google.com,2009:buzz/z12zwdhxowq2d13q204cjr04kzu0cns5gh0</id>
788         <link rel="alternate" type="text/html" href="http://www.google.com/buzz/117848251937215158042/ZU7b6mHJEmC/IMG-1366"/>
789         <author>
790             <name>Zach Copley</name>
791             <uri>http://www.google.com/profiles/zcopley</uri>
792         </author>
793         <content type="html">&lt;div&gt;IMG_1366&lt;/div&gt;</content>
794         <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" title="IMG_1366"/>
795         <media:content url="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" medium="image">
796             <media:title>IMG_1366</media:title>
797             <media:player url="http://farm5.static.flickr.com/4053/4442630700_980b19a1a6_o.jpg" height="1600" width="1200"/>
798         </media:content>
799         <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" title="IMG_1365"/>
800         <media:content url="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" medium="image">
801             <media:title>IMG_1365</media:title>
802             <media:player url="http://farm5.static.flickr.com/4043/4442630390_62da5560ae_o.jpg" height="1200" width="1600"/>
803         </media:content>
804         <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
805         <activity:object>
806             <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
807             <id>tag:google.com,2009:buzz/z12zwdhxowq2d13q204cjr04kzu0cns5gh0</id>
808             <title>Buzz by Zach Copley from Flickr</title>
809             <content type="html">&lt;div&gt;IMG_1366&lt;/div&gt;</content>
810             <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" title="IMG_1366"/>
811             <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" title="IMG_1365"/>
812         </activity:object>
813         <link rel="replies" type="application/atom+xml" href="http://buzz.googleapis.com/feeds/117848251937215158042/comments/z12zwdhxowq2d13q204cjr04kzu0cns5gh0" thr:count="0"/>
814         <thr:total>0</thr:total>
815     </entry>
816 </feed>
817 EXAMPLE9;
818
819 // Sample PuSH entry from a group feed in 0.9.7
820 // Old <activity:actor> has been removed from entries in this version.
821 // A bug in the order of input processing meant that we were incorrectly
822 // reading the feed's <activity:subject> instead of the entry's <author>,
823 // causing the entry to get rejected as malformed (groups can't post on
824 // their own; we want to see the actual author's info here).
825 $_example10 = <<<EXAMPLE10
826 <?xml version="1.0" encoding="UTF-8"?>
827 <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/">
828  <generator uri="http://status.net" version="0.9.7alpha1">StatusNet</generator>
829  <id>http://lazarus.local/mublog/api/statusnet/groups/timeline/22.atom</id>
830  <title>grouptest316173 timeline</title>
831  <subtitle>Updates from grouptest316173 on Blaguette!</subtitle>
832  <logo>http://lazarus.local/mublog/theme/default/default-avatar-profile.png</logo>
833  <updated>2011-01-06T22:44:18+00:00</updated>
834 <author>
835  <activity:object-type>http://activitystrea.ms/schema/1.0/group</activity:object-type>
836  <uri>http://lazarus.local/mublog/group/22/id</uri>
837  <name>grouptest316173</name>
838  <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/group/22/id"/>
839  <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
840  <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
841  <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
842  <poco:preferredUsername>grouptest316173</poco:preferredUsername>
843  <poco:displayName>grouptest316173</poco:displayName>
844 </author>
845 <activity:subject>
846  <activity:object-type>http://activitystrea.ms/schema/1.0/group</activity:object-type>
847  <id>http://lazarus.local/mublog/group/22/id</id>
848  <title>grouptest316173</title>
849  <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/group/22/id"/>
850  <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
851  <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
852  <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
853  <poco:preferredUsername>grouptest316173</poco:preferredUsername>
854  <poco:displayName>grouptest316173</poco:displayName>
855 </activity:subject>
856  <link href="http://lazarus.local/mublog/group/grouptest316173" rel="alternate" type="text/html"/>
857  <link href="http://lazarus.local/mublog/main/push/hub" rel="hub"/>
858  <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="salmon"/>
859  <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="http://salmon-protocol.org/ns/salmon-replies"/>
860  <link href="http://lazarus.local/mublog/main/salmon/group/22" rel="http://salmon-protocol.org/ns/salmon-mention"/>
861  <link href="http://lazarus.local/mublog/api/statusnet/groups/timeline/22.atom" rel="self" type="application/atom+xml"/>
862  <statusnet:group_info member_count="2"></statusnet:group_info>
863 <entry>
864  <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
865  <id>http://lazarus.local/mublog/notice/1243</id>
866  <title>Group post from local to !grouptest316173, should go out over push.</title>
867  <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>
868  <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/notice/1243"/>
869  <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
870  <published>2011-01-06T22:44:18+00:00</published>
871  <updated>2011-01-06T22:44:18+00:00</updated>
872  <author>
873   <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
874   <uri>http://lazarus.local/mublog/user/557</uri>
875   <name>Pubtest316173 Smith</name>
876   <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/pubtest316173"/>
877   <link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://lazarus.local/mublog/theme/default/default-avatar-profile.png"/>
878   <link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://lazarus.local/mublog/theme/default/default-avatar-stream.png"/>
879   <link rel="avatar" type="image/png" media:width="24" media:height="24" href="http://lazarus.local/mublog/theme/default/default-avatar-mini.png"/>
880   <poco:preferredUsername>pubtest316173</poco:preferredUsername>
881   <poco:displayName>Pubtest316173 Smith</poco:displayName>
882   <poco:note>Stub account for OStatus tests.</poco:note>
883   <poco:urls>
884    <poco:type>homepage</poco:type>
885    <poco:value>http://example.org/pubtest316173</poco:value>
886    <poco:primary>true</poco:primary>
887   </poco:urls>
888  </author>
889  <link rel="ostatus:conversation" href="http://lazarus.local/mublog/conversation/1131"/>
890  <link rel="ostatus:attention" href="http://lazarus.local/mublog/group/22/id"/>
891  <link rel="mentioned" href="http://lazarus.local/mublog/group/22/id"/>
892  <category term="grouptest316173"></category>
893  <source>
894   <id>http://lazarus.local/mublog/api/statuses/user_timeline/557.atom</id>
895   <title>Pubtest316173 Smith</title>
896   <link rel="alternate" type="text/html" href="http://lazarus.local/mublog/pubtest316173"/>
897   <link rel="self" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/user_timeline/557.atom"/>
898   <link rel="license" href="http://creativecommons.org/licenses/by/3.0/"/>
899   <icon>http://lazarus.local/mublog/theme/default/default-avatar-profile.png</icon>
900   <updated>2011-01-06T22:44:18+00:00</updated>
901  </source>
902  <link rel="self" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/show/1243.atom"/>
903  <link rel="edit" type="application/atom+xml" href="http://lazarus.local/mublog/api/statuses/show/1243.atom"/>
904  <statusnet:notice_info local_id="1243" source="api"></statusnet:notice_info>
905 </entry>
906 </feed>
907 EXAMPLE10;