Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
require_once dirname(dirname(__FILE__)) . '/XML_Feed_Parser_TestCase.php';
4
 
5
class atom_TestCase extends XML_Feed_Parser_Converted_TestCase {
6
 
7
    public function setUp() {
8
        parent::setUp();
9
 
10
        $this->markTestSkipped('The current behaviour of this package is to treat Atom 0.3 as Atom 1.0 and raise a warning.');
11
    }
12
 
13
    function test_atom_namespace_1_1() {
14
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/atom_namespace_1.xml');
15
 
16
        $feed = new XML_Feed_Parser($content);
17
 
18
        $this->assertEquals('Example Atom', $feed->title);
19
    }
20
 
21
    function test_atom_namespace_2_1() {
22
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/atom_namespace_2.xml');
23
 
24
        $feed = new XML_Feed_Parser($content);
25
 
26
        $this->assertEquals('Example Atom', $feed->title);
27
    }
28
 
29
    function test_atom_namespace_3_1() {
30
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/atom_namespace_3.xml');
31
 
32
        $feed = new XML_Feed_Parser($content);
33
 
34
        $this->assertEquals('Example Atom', $feed->title);
35
    }
36
 
37
    function test_atom_namespace_4_1() {
38
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/atom_namespace_4.xml');
39
 
40
        $feed = new XML_Feed_Parser($content);
41
 
42
        $this->assertEquals('Example Atom', $feed->title);
43
    }
44
 
45
    function test_atom_namespace_5_1() {
46
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/atom_namespace_5.xml');
47
 
48
        $feed = new XML_Feed_Parser($content);
49
 
50
        $this->assertEquals('Example Atom', $feed->title);
51
    }
52
 
53
    function test_entry_author_email_1() {
54
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_email.xml');
55
 
56
        $feed = new XML_Feed_Parser($content);
57
 
58
        $this->assertEquals('me@example.com', $feed->getEntryByOffset(0)->author(0, 'email'));
59
    }
60
 
61
    function test_entry_author_homepage_1() {
62
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_homepage.xml');
63
 
64
        $feed = new XML_Feed_Parser($content);
65
 
66
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->author(0, 'url'));
67
    }
68
 
69
    function test_entry_author_map_author_1() {
70
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_map_author.xml');
71
 
72
        $feed = new XML_Feed_Parser($content);
73
 
74
        $this->assertEquals('Example author (me@example.com)', $feed->getEntryByOffset(0)->author);
75
    }
76
 
77
    function test_entry_author_map_author_2_1() {
78
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_map_author_2.xml');
79
 
80
        $feed = new XML_Feed_Parser($content);
81
 
82
        $this->assertEquals('Example author', $feed->getEntryByOffset(0)->author);
83
    }
84
 
85
    function test_entry_author_name_1() {
86
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_name.xml');
87
 
88
        $feed = new XML_Feed_Parser($content);
89
 
90
        $this->assertEquals('Example author', $feed->getEntryByOffset(0)->author(0, 'name'));
91
    }
92
 
93
    function test_entry_author_uri_1() {
94
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_uri.xml');
95
 
96
        $feed = new XML_Feed_Parser($content);
97
 
98
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->author(0, 'url'));
99
    }
100
 
101
    function test_entry_author_url_1() {
102
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_author_url.xml');
103
 
104
        $feed = new XML_Feed_Parser($content);
105
 
106
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->author(0, 'url'));
107
    }
108
 
109
    function test_entry_content_mode_base64_0() {
110
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_content_mode_base64.xml');
111
 
112
        $feed = new XML_Feed_Parser($content);
113
 
114
        //$this->assertEquals(, 1);
115
    }
116
 
117
    function test_entry_content_mode_escaped_0() {
118
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_content_mode_escaped.xml');
119
 
120
        $feed = new XML_Feed_Parser($content);
121
 
122
        //$this->assertEquals(, 1);
123
    }
124
 
125
    function test_entry_content_type_1() {
126
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_content_type.xml');
127
 
128
        $feed = new XML_Feed_Parser($content);
129
 
130
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->content(0, 'type'));
131
    }
132
 
133
    function test_entry_content_type_text_plain_1() {
134
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_content_type_text_plain.xml');
135
 
136
        $feed = new XML_Feed_Parser($content);
137
 
138
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->content(0, 'type'));
139
    }
140
 
141
    function test_entry_content_value_1() {
142
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_content_value.xml');
143
 
144
        $feed = new XML_Feed_Parser($content);
145
 
146
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->content(0, 'value'));
147
    }
148
 
149
    function test_entry_contributor_email_1() {
150
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_email.xml');
151
 
152
        $feed = new XML_Feed_Parser($content);
153
 
154
        $this->assertEquals('me@example.com', $feed->getEntryByOffset(0)->contributors(0, 'email'));
155
    }
156
 
157
    function test_entry_contributor_homepage_1() {
158
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_homepage.xml');
159
 
160
        $feed = new XML_Feed_Parser($content);
161
 
162
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->contributors(0, 'url'));
163
    }
164
 
165
    function test_entry_contributor_multiple_1() {
166
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_multiple.xml');
167
 
168
        $feed = new XML_Feed_Parser($content);
169
 
170
        $this->assertEquals(array(array('name' => 'Contributor 1', 'email' => 'me@example.com', 'href' => 'http://example.com/'), array('name' => 'Contributor 2', 'email' => 'you@example.com', 'href' => 'http://two.example.com/')), $feed->getEntryByOffset(0)->contributors);
171
    }
172
 
173
    function test_entry_contributor_name_1() {
174
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_name.xml');
175
 
176
        $feed = new XML_Feed_Parser($content);
177
 
178
        $this->assertEquals('Example contributor', $feed->getEntryByOffset(0)->contributors(0, 'name'));
179
    }
180
 
181
    function test_entry_contributor_uri_1() {
182
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_uri.xml');
183
 
184
        $feed = new XML_Feed_Parser($content);
185
 
186
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->contributors(0, 'url'));
187
    }
188
 
189
    function test_entry_contributor_url_1() {
190
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_contributor_url.xml');
191
 
192
        $feed = new XML_Feed_Parser($content);
193
 
194
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->contributors(0, 'url'));
195
    }
196
 
197
    function test_entry_id_1() {
198
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_id.xml');
199
 
200
        $feed = new XML_Feed_Parser($content);
201
 
202
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->id);
203
    }
204
 
205
    function test_entry_id_map_guid_1() {
206
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_id_map_guid.xml');
207
 
208
        $feed = new XML_Feed_Parser($content);
209
 
210
        $this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->guid);
211
    }
212
 
213
    function test_entry_link_alternate_map_link_1() {
214
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_alternate_map_link.xml');
215
 
216
        $feed = new XML_Feed_Parser($content);
217
 
218
        $this->assertEquals('http://www.example.com/', $feed->getEntryByOffset(0)->link);
219
    }
220
 
221
    function test_entry_link_alternate_map_link_2_1() {
222
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_alternate_map_link_2.xml');
223
 
224
        $feed = new XML_Feed_Parser($content);
225
 
226
        $this->assertEquals('http://www.example.com/', $feed->getEntryByOffset(0)->link);
227
    }
228
 
229
    function test_entry_link_href_1() {
230
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_href.xml');
231
 
232
        $feed = new XML_Feed_Parser($content);
233
 
234
        $this->assertEquals('http://www.example.com/', $feed->getEntryByOffset(0)->links(0, 'href'));
235
    }
236
 
237
    function test_entry_link_multiple_1() {
238
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_multiple.xml');
239
 
240
        $feed = new XML_Feed_Parser($content);
241
 
242
        $this->assertEquals(array(array('rel' => 'alternate', 'type' => 'application/xhtml+xml', 'href' => 'http://www.example.com/'), array('rel' => 'service.post', 'type' => 'application/atom+xml', 'href' => 'http://www.example.com/post')), $feed->getEntryByOffset(0)->links);
243
    }
244
 
245
    function test_entry_link_rel_1() {
246
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_rel.xml');
247
 
248
        $feed = new XML_Feed_Parser($content);
249
 
250
        $this->assertEquals('alternate', $feed->getEntryByOffset(0)->links(0, 'rel'));
251
    }
252
 
253
    function test_entry_link_title_1() {
254
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_title.xml');
255
 
256
        $feed = new XML_Feed_Parser($content);
257
 
258
        $this->assertEquals('Example title', $feed->getEntryByOffset(0)->links(0, 'title'));
259
    }
260
 
261
    function test_entry_link_type_1() {
262
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_link_type.xml');
263
 
264
        $feed = new XML_Feed_Parser($content);
265
 
266
        $this->assertEquals('text/html', $feed->getEntryByOffset(0)->links(0, 'type'));
267
    }
268
 
269
    function test_entry_summary_1() {
270
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary.xml');
271
 
272
        $feed = new XML_Feed_Parser($content);
273
 
274
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->summary);
275
    }
276
 
277
    function test_entry_summary_base64_1() {
278
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_base64.xml');
279
 
280
        $feed = new XML_Feed_Parser($content);
281
 
282
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->summary);
283
    }
284
 
285
    function test_entry_summary_base64_2_1() {
286
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_base64_2.xml');
287
 
288
        $feed = new XML_Feed_Parser($content);
289
 
290
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->getEntryByOffset(0)->summary);
291
    }
292
 
293
    function test_entry_summary_content_mode_base64_0() {
294
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_content_mode_base64.xml');
295
 
296
        $feed = new XML_Feed_Parser($content);
297
 
298
        $this->markTestIncomplete("Not yet implemented");
299
    }
300
 
301
    function test_entry_summary_content_mode_escaped_0() {
302
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_content_mode_escaped.xml');
303
 
304
        $feed = new XML_Feed_Parser($content);
305
 
306
        $this->markTestIncomplete("Not yet implemented");
307
    }
308
 
309
    function test_entry_summary_content_type_1() {
310
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_content_type.xml');
311
 
312
        $feed = new XML_Feed_Parser($content);
313
 
314
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->summary(0, 'type'));
315
    }
316
 
317
    function test_entry_summary_content_type_text_plain_1() {
318
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_content_type_text_plain.xml');
319
 
320
        $feed = new XML_Feed_Parser($content);
321
 
322
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->summary(0, 'type'));
323
    }
324
 
325
    function test_entry_summary_content_value_1() {
326
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_content_value.xml');
327
 
328
        $feed = new XML_Feed_Parser($content);
329
 
330
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->summary);
331
    }
332
 
333
    function test_entry_summary_escaped_markup_1() {
334
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_escaped_markup.xml');
335
 
336
        $feed = new XML_Feed_Parser($content);
337
 
338
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->summary);
339
    }
340
 
341
    function test_entry_summary_inline_markup_1() {
342
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_inline_markup.xml');
343
 
344
        $feed = new XML_Feed_Parser($content);
345
 
346
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->getEntryByOffset(0)->summary);
347
    }
348
 
349
    function test_entry_summary_inline_markup_2_1() {
350
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_inline_markup_2.xml');
351
 
352
        $feed = new XML_Feed_Parser($content);
353
 
354
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->getEntryByOffset(0)->summary);
355
    }
356
 
357
    function test_entry_summary_naked_markup_1() {
358
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_naked_markup.xml');
359
 
360
        $feed = new XML_Feed_Parser($content);
361
 
362
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->summary);
363
    }
364
 
365
    function test_entry_summary_text_plain_1() {
366
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_summary_text_plain.xml');
367
 
368
        $feed = new XML_Feed_Parser($content);
369
 
370
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->summary);
371
    }
372
 
373
    function test_entry_title_1() {
374
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title.xml');
375
 
376
        $feed = new XML_Feed_Parser($content);
377
 
378
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->title);
379
    }
380
 
381
    function test_entry_title_base64_1() {
382
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_base64.xml');
383
 
384
        $feed = new XML_Feed_Parser($content);
385
 
386
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->title);
387
    }
388
 
389
    function test_entry_title_base64_2_1() {
390
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_base64_2.xml');
391
 
392
        $feed = new XML_Feed_Parser($content);
393
 
394
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->getEntryByOffset(0)->title);
395
    }
396
 
397
    function test_entry_title_content_mode_base64_0() {
398
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_content_mode_base64.xml');
399
 
400
        $feed = new XML_Feed_Parser($content);
401
 
402
        $this->markTestIncomplete("Not yet implemented");
403
    }
404
 
405
    function test_entry_title_content_mode_escaped_0() {
406
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_content_mode_escaped.xml');
407
 
408
        $feed = new XML_Feed_Parser($content);
409
 
410
 //       $this->assertEquals(, 1);
411
    }
412
 
413
    function test_entry_title_content_type_1() {
414
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_content_type.xml');
415
 
416
        $feed = new XML_Feed_Parser($content);
417
 
418
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->title(0, 'type'));
419
    }
420
 
421
    function test_entry_title_content_type_text_plain_1() {
422
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_content_type_text_plain.xml');
423
 
424
        $feed = new XML_Feed_Parser($content);
425
 
426
        $this->assertEquals('text/plain', $feed->getEntryByOffset(0)->title(0, 'type'));
427
    }
428
 
429
    function test_entry_title_content_value_1() {
430
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_content_value.xml');
431
 
432
        $feed = new XML_Feed_Parser($content);
433
 
434
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->title);
435
    }
436
 
437
    function test_entry_title_escaped_markup_1() {
438
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_escaped_markup.xml');
439
 
440
        $feed = new XML_Feed_Parser($content);
441
 
442
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->title);
443
    }
444
 
445
    function test_entry_title_inline_markup_1() {
446
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_inline_markup.xml');
447
 
448
        $feed = new XML_Feed_Parser($content);
449
 
450
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->getEntryByOffset(0)->title);
451
    }
452
 
453
    function test_entry_title_inline_markup_2_1() {
454
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_inline_markup_2.xml');
455
 
456
        $feed = new XML_Feed_Parser($content);
457
 
458
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->getEntryByOffset(0)->title);
459
    }
460
 
461
    function test_entry_title_naked_markup_1() {
462
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_naked_markup.xml');
463
 
464
        $feed = new XML_Feed_Parser($content);
465
 
466
        $this->assertEquals('Example <b>Atom</b>', $feed->getEntryByOffset(0)->title);
467
    }
468
 
469
    function test_entry_title_text_plain_1() {
470
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_text_plain.xml');
471
 
472
        $feed = new XML_Feed_Parser($content);
473
 
474
        $this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->title);
475
    }
476
 
477
    function test_entry_title_text_plain_brackets_1() {
478
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/entry_title_text_plain_brackets.xml');
479
 
480
        $feed = new XML_Feed_Parser($content);
481
 
482
        $this->assertEquals('History of the <blink> tag', $feed->getEntryByOffset(0)->title);
483
    }
484
 
485
    function test_feed_author_email_1() {
486
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_email.xml');
487
 
488
        $feed = new XML_Feed_Parser($content);
489
 
490
        $this->assertEquals('me@example.com', $feed->author(0, 'email'));
491
    }
492
 
493
    function test_feed_author_homepage_1() {
494
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_homepage.xml');
495
 
496
        $feed = new XML_Feed_Parser($content);
497
 
498
        $this->assertEquals('http://example.com/', $feed->author(0, 'url'));
499
    }
500
 
501
    function test_feed_author_map_author_1() {
502
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_map_author.xml');
503
 
504
        $feed = new XML_Feed_Parser($content);
505
 
506
        $this->assertEquals('Example author (me@example.com)', $feed->author);
507
    }
508
 
509
    function test_feed_author_map_author_2_1() {
510
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_map_author_2.xml');
511
 
512
        $feed = new XML_Feed_Parser($content);
513
 
514
        $this->assertEquals('Example author', $feed->author);
515
    }
516
 
517
    function test_feed_author_name_1() {
518
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_name.xml');
519
 
520
        $feed = new XML_Feed_Parser($content);
521
 
522
        $this->assertEquals('Example author', $feed->author(0, 'name'));
523
    }
524
 
525
    function test_feed_author_uri_1() {
526
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_uri.xml');
527
 
528
        $feed = new XML_Feed_Parser($content);
529
 
530
        $this->assertEquals('http://example.com/', $feed->author(0, 'url'));
531
    }
532
 
533
    function test_feed_author_url_1() {
534
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_author_url.xml');
535
 
536
        $feed = new XML_Feed_Parser($content);
537
 
538
        $this->assertEquals('http://example.com/', $feed->author(0, 'url'));
539
    }
540
 
541
    function test_feed_contributor_email_1() {
542
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_email.xml');
543
 
544
        $feed = new XML_Feed_Parser($content);
545
 
546
        $this->assertEquals('me@example.com', $feed->contributors(0, 'email'));
547
    }
548
 
549
    function test_feed_contributor_homepage_1() {
550
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_homepage.xml');
551
 
552
        $feed = new XML_Feed_Parser($content);
553
 
554
        $this->assertEquals('http://example.com/', $feed->contributors(0, 'url'));
555
    }
556
 
557
    function test_feed_contributor_multiple_1() {
558
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_multiple.xml');
559
 
560
        $feed = new XML_Feed_Parser($content);
561
 
562
        $this->assertEquals(array(array('name' => 'Contributor 1', 'email' => 'me@example.com', 'href' => 'http://example.com/'), array('name' => 'Contributor 2', 'email' => 'you@example.com', 'href' => 'http://two.example.com/')), $feed->contributors);
563
    }
564
 
565
    function test_feed_contributor_name_1() {
566
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_name.xml');
567
 
568
        $feed = new XML_Feed_Parser($content);
569
 
570
        $this->assertEquals('Example contributor', $feed->contributors(0, 'name'));
571
    }
572
 
573
    function test_feed_contributor_uri_1() {
574
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_uri.xml');
575
 
576
        $feed = new XML_Feed_Parser($content);
577
 
578
        $this->assertEquals('http://example.com/', $feed->contributors(0, 'url'));
579
    }
580
 
581
    function test_feed_contributor_url_1() {
582
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_contributor_url.xml');
583
 
584
        $feed = new XML_Feed_Parser($content);
585
 
586
        $this->assertEquals('http://example.com/', $feed->contributors(0, 'url'));
587
    }
588
 
589
    function test_feed_copyright_1() {
590
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright.xml');
591
 
592
        $feed = new XML_Feed_Parser($content);
593
 
594
        $this->assertEquals('Example Atom', $feed->copyright);
595
    }
596
 
597
    function test_feed_copyright_base64_1() {
598
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_base64.xml');
599
 
600
        $feed = new XML_Feed_Parser($content);
601
 
602
        $this->assertEquals('Example <b>Atom</b>', $feed->copyright);
603
    }
604
 
605
    function test_feed_copyright_base64_2_1() {
606
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_base64_2.xml');
607
 
608
        $feed = new XML_Feed_Parser($content);
609
 
610
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->copyright);
611
    }
612
 
613
    function test_feed_copyright_content_mode_base64_0() {
614
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_content_mode_base64.xml');
615
 
616
        $feed = new XML_Feed_Parser($content);
617
 
618
        $this->markTestIncomplete("Not yet implemented");
619
    }
620
 
621
    function test_feed_copyright_content_mode_escaped_0() {
622
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_content_mode_escaped.xml');
623
 
624
        $feed = new XML_Feed_Parser($content);
625
 
626
 //       $this->assertEquals(, 1);
627
    }
628
 
629
    function test_feed_copyright_content_type_1() {
630
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_content_type.xml');
631
 
632
        $feed = new XML_Feed_Parser($content);
633
 
634
        $this->assertEquals('text/plain', $feed->copyright(0, 'type'));
635
    }
636
 
637
    function test_feed_copyright_content_type_text_plain_1() {
638
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_content_type_text_plain.xml');
639
 
640
        $feed = new XML_Feed_Parser($content);
641
 
642
        $this->assertEquals('text/plain', $feed->copyright(0, 'type'));
643
    }
644
 
645
    function test_feed_copyright_content_value_1() {
646
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_content_value.xml');
647
 
648
        $feed = new XML_Feed_Parser($content);
649
 
650
        $this->assertEquals('Example Atom', $feed->copyright);
651
    }
652
 
653
    function test_feed_copyright_escaped_markup_1() {
654
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_escaped_markup.xml');
655
 
656
        $feed = new XML_Feed_Parser($content);
657
 
658
        $this->assertEquals('Example <b>Atom</b>', $feed->copyright);
659
    }
660
 
661
    function test_feed_copyright_inline_markup_1() {
662
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_inline_markup.xml');
663
 
664
        $feed = new XML_Feed_Parser($content);
665
 
666
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->copyright);
667
    }
668
 
669
    function test_feed_copyright_inline_markup_2_1() {
670
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_inline_markup_2.xml');
671
 
672
        $feed = new XML_Feed_Parser($content);
673
 
674
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->copyright);
675
    }
676
 
677
    function test_feed_copyright_naked_markup_1() {
678
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_naked_markup.xml');
679
 
680
        $feed = new XML_Feed_Parser($content);
681
 
682
        $this->assertEquals('Example <b>Atom</b>', $feed->copyright);
683
    }
684
 
685
    function test_feed_copyright_text_plain_1() {
686
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_copyright_text_plain.xml');
687
 
688
        $feed = new XML_Feed_Parser($content);
689
 
690
        $this->assertEquals('Example Atom', $feed->copyright);
691
    }
692
 
693
    function test_feed_generator_1() {
694
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_generator.xml');
695
 
696
        $feed = new XML_Feed_Parser($content);
697
 
698
        $this->assertEquals('Example generator', $feed->generator);
699
    }
700
 
701
    function test_feed_generator_name_1() {
702
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_generator_name.xml');
703
 
704
        $feed = new XML_Feed_Parser($content);
705
 
706
        $this->assertEquals('Example generator', $feed->generator(0, 'name'));
707
    }
708
 
709
    function test_feed_generator_url_1() {
710
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_generator_url.xml');
711
 
712
        $feed = new XML_Feed_Parser($content);
713
 
714
        $this->assertEquals('http://example.com/', $feed->generator(0, 'url'));
715
    }
716
 
717
    function test_feed_generator_version_1() {
718
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_generator_version.xml');
719
 
720
        $feed = new XML_Feed_Parser($content);
721
 
722
        $this->assertEquals('2.65', $feed->generator(0, 'version'));
723
    }
724
 
725
    function test_feed_id_1() {
726
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_id.xml');
727
 
728
        $feed = new XML_Feed_Parser($content);
729
 
730
        $this->assertEquals('http://example.com/', $feed->id);
731
    }
732
 
733
    function test_feed_id_map_guid_1() {
734
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_id_map_guid.xml');
735
 
736
        $feed = new XML_Feed_Parser($content);
737
 
738
        $this->assertEquals('http://example.com/', $feed->guid);
739
    }
740
 
741
    function test_feed_info_1() {
742
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info.xml');
743
 
744
        $feed = new XML_Feed_Parser($content);
745
 
746
        $this->assertEquals('Example Atom', $feed->info);
747
    }
748
 
749
    function test_feed_info_base64_1() {
750
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_base64.xml');
751
 
752
        $feed = new XML_Feed_Parser($content);
753
 
754
        $this->assertEquals('Example <b>Atom</b>', $feed->info);
755
    }
756
 
757
    function test_feed_info_base64_2_1() {
758
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_base64_2.xml');
759
 
760
        $feed = new XML_Feed_Parser($content);
761
 
762
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->info);
763
    }
764
 
765
    function test_feed_info_content_mode_base64_0() {
766
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_content_mode_base64.xml');
767
 
768
        $feed = new XML_Feed_Parser($content);
769
 
770
        $this->markTestIncomplete("Not yet implemented");
771
    }
772
 
773
    function test_feed_info_content_mode_escaped_0() {
774
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_content_mode_escaped.xml');
775
 
776
        $feed = new XML_Feed_Parser($content);
777
 
778
        $this->markTestIncomplete("Not yet implemented");
779
    }
780
 
781
    function test_feed_info_content_type_1() {
782
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_content_type.xml');
783
 
784
        $feed = new XML_Feed_Parser($content);
785
 
786
        $this->assertEquals('text/plain', $feed->info(0, 'type'));
787
    }
788
 
789
    function test_feed_info_content_type_text_plain_1() {
790
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_content_type_text_plain.xml');
791
 
792
        $feed = new XML_Feed_Parser($content);
793
 
794
        $this->assertEquals('text/plain', $feed->info(0, 'type'));
795
    }
796
 
797
    function test_feed_info_content_value_1() {
798
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_content_value.xml');
799
 
800
        $feed = new XML_Feed_Parser($content);
801
 
802
        $this->assertEquals('Example Atom', $feed->info);
803
    }
804
 
805
    function test_feed_info_escaped_markup_1() {
806
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_escaped_markup.xml');
807
 
808
        $feed = new XML_Feed_Parser($content);
809
 
810
        $this->assertEquals('Example <b>Atom</b>', $feed->info);
811
    }
812
 
813
    function test_feed_info_inline_markup_1() {
814
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_inline_markup.xml');
815
 
816
        $feed = new XML_Feed_Parser($content);
817
 
818
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->info);
819
    }
820
 
821
    function test_feed_info_inline_markup_2_1() {
822
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_inline_markup_2.xml');
823
 
824
        $feed = new XML_Feed_Parser($content);
825
 
826
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->info);
827
    }
828
 
829
    function test_feed_info_naked_markup_1() {
830
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_naked_markup.xml');
831
 
832
        $feed = new XML_Feed_Parser($content);
833
 
834
        $this->assertEquals('Example <b>Atom</b>', $feed->info);
835
    }
836
 
837
    function test_feed_info_text_plain_1() {
838
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_info_text_plain.xml');
839
 
840
        $feed = new XML_Feed_Parser($content);
841
 
842
        $this->assertEquals('Example Atom', $feed->info);
843
    }
844
 
845
    function test_feed_link_alternate_map_link_1() {
846
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_alternate_map_link.xml');
847
 
848
        $feed = new XML_Feed_Parser($content);
849
 
850
        $this->assertEquals('http://www.example.com/', $feed->link);
851
    }
852
 
853
    function test_feed_link_alternate_map_link_2_1() {
854
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_alternate_map_link_2.xml');
855
 
856
        $feed = new XML_Feed_Parser($content);
857
 
858
        $this->assertEquals('http://www.example.com/', $feed->link);
859
    }
860
 
861
    function test_feed_link_href_1() {
862
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_href.xml');
863
 
864
        $feed = new XML_Feed_Parser($content);
865
 
866
        $this->assertEquals('http://www.example.com/', $feed->links(0, 'href'));
867
    }
868
 
869
    function test_feed_link_multiple_1() {
870
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_multiple.xml');
871
 
872
        $feed = new XML_Feed_Parser($content);
873
 
874
        $this->assertEquals(array(array('rel' => 'alternate', 'type' => 'application/xhtml+xml', 'href' => 'http://www.example.com/'), array('rel' => 'service.post', 'type' => 'application/atom+xml', 'href' => 'http://www.example.com/post')), $feed->links);
875
    }
876
 
877
    function test_feed_link_rel_1() {
878
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_rel.xml');
879
 
880
        $feed = new XML_Feed_Parser($content);
881
 
882
        $this->assertEquals('alternate', $feed->links(0, 'rel'));
883
    }
884
 
885
    function test_feed_link_title_1() {
886
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_title.xml');
887
 
888
        $feed = new XML_Feed_Parser($content);
889
 
890
        $this->assertEquals('Example title', $feed->links(0, 'title'));
891
    }
892
 
893
    function test_feed_link_type_1() {
894
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_link_type.xml');
895
 
896
        $feed = new XML_Feed_Parser($content);
897
 
898
        $this->assertEquals('text/html', $feed->links(0, 'type'));
899
    }
900
 
901
    function test_feed_tagline_1() {
902
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline.xml');
903
 
904
        $feed = new XML_Feed_Parser($content);
905
 
906
        $this->assertEquals('Example Atom', $feed->tagline);
907
    }
908
 
909
    function test_feed_tagline_base64_1() {
910
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_base64.xml');
911
 
912
        $feed = new XML_Feed_Parser($content);
913
 
914
        $this->assertEquals('Example <b>Atom</b>', $feed->tagline);
915
    }
916
 
917
    function test_feed_tagline_base64_2_1() {
918
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_base64_2.xml');
919
 
920
        $feed = new XML_Feed_Parser($content);
921
 
922
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->tagline);
923
    }
924
 
925
    function test_feed_tagline_content_mode_base64_0() {
926
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_content_mode_base64.xml');
927
 
928
        $feed = new XML_Feed_Parser($content);
929
 
930
        $this->markTestIncomplete("Not yet implemented");
931
    }
932
 
933
    function test_feed_tagline_content_mode_escaped_0() {
934
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_content_mode_escaped.xml');
935
 
936
        $feed = new XML_Feed_Parser($content);
937
 
938
        $this->markTestIncomplete("Not yet implemented");
939
    }
940
 
941
    function test_feed_tagline_content_type_1() {
942
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_content_type.xml');
943
 
944
        $feed = new XML_Feed_Parser($content);
945
 
946
        $this->assertEquals('text/plain', $feed->tagline(0, 'type'));
947
    }
948
 
949
    function test_feed_tagline_content_type_text_plain_1() {
950
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_content_type_text_plain.xml');
951
 
952
        $feed = new XML_Feed_Parser($content);
953
 
954
        $this->assertEquals('text/plain', $feed->tagline(0, 'type'));
955
    }
956
 
957
    function test_feed_tagline_content_value_1() {
958
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_content_value.xml');
959
 
960
        $feed = new XML_Feed_Parser($content);
961
 
962
        $this->assertEquals('Example Atom', $feed->tagline);
963
    }
964
 
965
    function test_feed_tagline_escaped_markup_1() {
966
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_escaped_markup.xml');
967
 
968
        $feed = new XML_Feed_Parser($content);
969
 
970
        $this->assertEquals('Example <b>Atom</b>', $feed->tagline);
971
    }
972
 
973
    function test_feed_tagline_inline_markup_1() {
974
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_inline_markup.xml');
975
 
976
        $feed = new XML_Feed_Parser($content);
977
 
978
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->tagline);
979
    }
980
 
981
    function test_feed_tagline_inline_markup_2_1() {
982
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_inline_markup_2.xml');
983
 
984
        $feed = new XML_Feed_Parser($content);
985
 
986
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->tagline);
987
    }
988
 
989
    function test_feed_tagline_naked_markup_1() {
990
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_naked_markup.xml');
991
 
992
        $feed = new XML_Feed_Parser($content);
993
 
994
        $this->assertEquals('Example <b>Atom</b>', $feed->tagline);
995
    }
996
 
997
    function test_feed_tagline_text_plain_1() {
998
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_tagline_text_plain.xml');
999
 
1000
        $feed = new XML_Feed_Parser($content);
1001
 
1002
        $this->assertEquals('Example Atom', $feed->tagline);
1003
    }
1004
 
1005
    function test_feed_title_1() {
1006
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title.xml');
1007
 
1008
        $feed = new XML_Feed_Parser($content);
1009
 
1010
        $this->assertEquals('Example Atom', $feed->title);
1011
    }
1012
 
1013
    function test_feed_title_base64_1() {
1014
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_base64.xml');
1015
 
1016
        $feed = new XML_Feed_Parser($content);
1017
 
1018
        $this->assertEquals('Example <b>Atom</b>', $feed->title);
1019
    }
1020
 
1021
    function test_feed_title_base64_2_1() {
1022
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_base64_2.xml');
1023
 
1024
        $feed = new XML_Feed_Parser($content);
1025
 
1026
        $this->assertEquals('<p>History of the &lt;blink&gt; tag</p>', $feed->title);
1027
    }
1028
 
1029
    function test_feed_title_content_mode_base64_0() {
1030
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_content_mode_base64.xml');
1031
 
1032
        $feed = new XML_Feed_Parser($content);
1033
 
1034
        $this->markTestIncomplete("Not yet implemented");
1035
    }
1036
 
1037
    function test_feed_title_content_mode_escaped_0() {
1038
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_content_mode_escaped.xml');
1039
 
1040
        $feed = new XML_Feed_Parser($content);
1041
 
1042
        $this->markTestIncomplete("Not yet implemented");
1043
    }
1044
 
1045
    function test_feed_title_content_type_1() {
1046
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_content_type.xml');
1047
 
1048
        $feed = new XML_Feed_Parser($content);
1049
 
1050
        $this->assertEquals('text/plain', $feed->title(0, 'type'));
1051
    }
1052
 
1053
    function test_feed_title_content_type_text_plain_1() {
1054
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_content_type_text_plain.xml');
1055
 
1056
        $feed = new XML_Feed_Parser($content);
1057
 
1058
        $this->assertEquals('text/plain', $feed->title(0, 'type'));
1059
    }
1060
 
1061
    function test_feed_title_content_value_1() {
1062
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_content_value.xml');
1063
 
1064
        $feed = new XML_Feed_Parser($content);
1065
 
1066
        $this->assertEquals('Example Atom', $feed->title);
1067
    }
1068
 
1069
    function test_feed_title_escaped_markup_1() {
1070
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_escaped_markup.xml');
1071
 
1072
        $feed = new XML_Feed_Parser($content);
1073
 
1074
        $this->assertEquals('Example <b>Atom</b>', $feed->title);
1075
    }
1076
 
1077
    function test_feed_title_inline_markup_1() {
1078
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_inline_markup.xml');
1079
 
1080
        $feed = new XML_Feed_Parser($content);
1081
 
1082
        $this->assertEquals('<div>Example <b>Atom</b></div>', $feed->title);
1083
    }
1084
 
1085
    function test_feed_title_inline_markup_2_1() {
1086
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_inline_markup_2.xml');
1087
 
1088
        $feed = new XML_Feed_Parser($content);
1089
 
1090
        $this->assertEquals('<div>History of the &lt;blink&gt; tag</div>', $feed->title);
1091
    }
1092
 
1093
    function test_feed_title_naked_markup_1() {
1094
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_naked_markup.xml');
1095
 
1096
        $feed = new XML_Feed_Parser($content);
1097
 
1098
        $this->assertEquals('Example <b>Atom</b>', $feed->title);
1099
    }
1100
 
1101
    function test_feed_title_text_plain_1() {
1102
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/feed_title_text_plain.xml');
1103
 
1104
        $feed = new XML_Feed_Parser($content);
1105
 
1106
        $this->assertEquals('Example Atom', $feed->title);
1107
    }
1108
 
1109
    function test_relative_uri_1() {
1110
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/relative_uri.xml');
1111
 
1112
        $feed = new XML_Feed_Parser($content);
1113
 
1114
        $this->assertEquals('<div>Example <a href="http://example.com/test/test.html">test</a></div>', $feed->title);
1115
    }
1116
 
1117
    function test_relative_uri_inherit_1() {
1118
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/relative_uri_inherit.xml');
1119
 
1120
            $feed = new XML_Feed_Parser($content);
1121
 
1122
        $this->assertEquals('<div>Example <a href="http://example.com/test/test.html">test</a></div>', $feed->title);
1123
    }
1124
 
1125
    function test_relative_uri_inherit_2_1() {
1126
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom/relative_uri_inherit_2.xml');
1127
 
1128
        $feed = new XML_Feed_Parser($content);
1129
 
1130
        $this->assertEquals('<div>Example <a href="http://example.com/test/test.html">test</a></div>', $feed->title);
1131
    }
1132
}
1133
?>