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 base_TestCase extends XML_Feed_Parser_Converted_TestCase {
6
 
7
    function setUp() {
8
        if (LIBXML_VERSION <= 20632) {
9
            $this->markTestSkipped("Unable to test due to http://bugzilla.gnome.org/show_activity.cgi?id=565219");
10
        }
11
 
12
        parent::setUp();
13
    }
14
 
15
    function test_cdf_item_abstract_xml_base_1() {
16
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/cdf_item_abstract_xml_base.xml');
17
 
18
        $feed = new XML_Feed_Parser($content, true, true);
19
 
20
        $this->assertEquals('http://base.example.org/', $feed->getEntryByOffset(0)->summary(0, 'base'));
21
    }
22
 
23
    function test_entry_content_xml_base_1() {
24
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base.xml');
25
 
26
        $feed = new XML_Feed_Parser($content, true, true);
27
 
28
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base'));
29
    }
30
 
31
    function test_entry_content_xml_base_inherit_1() {
32
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit.xml');
33
 
34
        $feed = new XML_Feed_Parser($content, true, true);
35
 
36
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base'));
37
    }
38
 
39
    function test_entry_content_xml_base_inherit_2_1() {
40
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_2.xml');
41
 
42
        $feed = new XML_Feed_Parser($content, true, true);
43
 
44
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base'));
45
    }
46
 
47
    function test_entry_content_xml_base_inherit_3_1() {
48
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_3.xml');
49
 
50
        $feed = new XML_Feed_Parser($content, true, true);
51
 
52
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base'));
53
    }
54
 
55
    function test_entry_content_xml_base_inherit_4_1() {
56
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_4.xml');
57
 
58
        $feed = new XML_Feed_Parser($content, true, true);
59
 
60
        $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->content(0, 'base'));
61
    }
62
 
63
    function test_entry_summary_xml_base_1() {
64
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base.xml');
65
 
66
        $feed = new XML_Feed_Parser($content, true, true);
67
 
68
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base'));
69
    }
70
 
71
    function test_entry_summary_xml_base_inherit_1() {
72
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit.xml');
73
 
74
        $feed = new XML_Feed_Parser($content, true, true);
75
 
76
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base'));
77
    }
78
 
79
    function test_entry_summary_xml_base_inherit_2_1() {
80
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_2.xml');
81
 
82
        $feed = new XML_Feed_Parser($content, true, true);
83
 
84
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base'));
85
    }
86
 
87
    function test_entry_summary_xml_base_inherit_3_1() {
88
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_3.xml');
89
 
90
        $feed = new XML_Feed_Parser($content, true, true);
91
 
92
        $this->assertEquals('http://example.com/summary/', $feed->getEntryByOffset(0)->summary(0, 'base'));
93
    }
94
 
95
    function test_entry_summary_xml_base_inherit_4_1() {
96
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_4.xml');
97
 
98
        $feed = new XML_Feed_Parser($content, true, true);
99
 
100
        $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->summary(0, 'base'));
101
    }
102
 
103
    function test_entry_title_xml_base_1() {
104
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base.xml');
105
 
106
        $feed = new XML_Feed_Parser($content, true, true);
107
 
108
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
109
    }
110
 
111
    function test_entry_title_xml_base_inherit_1() {
112
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit.xml');
113
 
114
        $feed = new XML_Feed_Parser($content, true, true);
115
 
116
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
117
    }
118
 
119
    function test_entry_title_xml_base_inherit_2_1() {
120
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_2.xml');
121
 
122
        $feed = new XML_Feed_Parser($content, true, true);
123
 
124
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
125
    }
126
 
127
    function test_entry_title_xml_base_inherit_3_1() {
128
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_3.xml');
129
 
130
        $feed = new XML_Feed_Parser($content, true, true);
131
 
132
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
133
    }
134
 
135
    function test_entry_title_xml_base_inherit_4_1() {
136
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_4.xml');
137
 
138
        $feed = new XML_Feed_Parser($content, true, true);
139
 
140
        $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->title(0, 'base'));
141
    }
142
 
143
    function test_feed_copyright_xml_base_1() {
144
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base.xml');
145
 
146
        $feed = new XML_Feed_Parser($content, true, true);
147
 
148
        $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base'));
149
    }
150
 
151
    function test_feed_copyright_xml_base_inherit_1() {
152
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit.xml');
153
 
154
        $feed = new XML_Feed_Parser($content, true, true);
155
 
156
        $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base'));
157
    }
158
 
159
    function test_feed_copyright_xml_base_inherit_2_1() {
160
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_2.xml');
161
 
162
        $feed = new XML_Feed_Parser($content, true, true);
163
 
164
        $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base'));
165
    }
166
 
167
    function test_feed_copyright_xml_base_inherit_3_1() {
168
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_3.xml');
169
 
170
        $feed = new XML_Feed_Parser($content, true, true);
171
 
172
        $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base'));
173
    }
174
 
175
    function test_feed_copyright_xml_base_inherit_4_1() {
176
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_4.xml');
177
 
178
        $feed = new XML_Feed_Parser($content, true, true);
179
 
180
        $this->assertEquals('http://example.com/parent/', $feed->copyright(0, 'base'));
181
    }
182
 
183
    function test_feed_info_xml_base_1() {
184
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base.xml');
185
 
186
        $feed = new XML_Feed_Parser($content, true, true);
187
 
188
        $this->assertEquals('http://example.com/test/', $feed->info(0, 'base'));
189
    }
190
 
191
    function test_feed_info_xml_base_inherit_1() {
192
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit.xml');
193
 
194
        $feed = new XML_Feed_Parser($content, true, true);
195
 
196
        $this->assertEquals('http://example.com/test/', $feed->info(0, 'base'));
197
    }
198
 
199
    function test_feed_info_xml_base_inherit_2_1() {
200
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_2.xml');
201
 
202
        $feed = new XML_Feed_Parser($content, true, true);
203
 
204
        $this->assertEquals('http://example.com/test/', $feed->info(0, 'base'));
205
    }
206
 
207
    function test_feed_info_xml_base_inherit_3_1() {
208
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_3.xml');
209
 
210
        $feed = new XML_Feed_Parser($content, true, true);
211
 
212
        $this->assertEquals('http://example.com/info/', $feed->info(0, 'base'));
213
    }
214
 
215
    function test_feed_info_xml_base_inherit_4_1() {
216
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_4.xml');
217
 
218
        $feed = new XML_Feed_Parser($content, true, true);
219
 
220
        $this->assertEquals('http://example.com/parent/', $feed->info(0, 'base'));
221
    }
222
 
223
    function test_feed_tagline_xml_base_1() {
224
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base.xml');
225
 
226
        $feed = new XML_Feed_Parser($content, true, true);
227
 
228
        $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base'));
229
    }
230
 
231
    function test_feed_tagline_xml_base_inherit_1() {
232
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit.xml');
233
 
234
        $feed = new XML_Feed_Parser($content, true, true);
235
 
236
        $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base'));
237
    }
238
 
239
    function test_feed_tagline_xml_base_inherit_2_1() {
240
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_2.xml');
241
 
242
        $feed = new XML_Feed_Parser($content, true, true);
243
 
244
        $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base'));
245
    }
246
 
247
    function test_feed_tagline_xml_base_inherit_3_1() {
248
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_3.xml');
249
 
250
        $feed = new XML_Feed_Parser($content, true, true);
251
 
252
        $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base'));
253
    }
254
 
255
    function test_feed_tagline_xml_base_inherit_4_1() {
256
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_4.xml');
257
 
258
        $feed = new XML_Feed_Parser($content, true, true);
259
 
260
        $this->assertEquals('http://example.com/parent/', $feed->tagline(0, 'base'));
261
    }
262
 
263
    function test_feed_title_xml_base_1() {
264
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base.xml');
265
 
266
        $feed = new XML_Feed_Parser($content, true, true);
267
 
268
        $this->assertEquals('http://example.com/test/', $feed->title(0, 'base'));
269
    }
270
 
271
    function test_feed_title_xml_base_inherit_1() {
272
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit.xml');
273
 
274
        $feed = new XML_Feed_Parser($content, true, true);
275
 
276
        $this->assertEquals('http://example.com/test/', $feed->title(0, 'base'));
277
    }
278
 
279
    function test_feed_title_xml_base_inherit_2_1() {
280
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_2.xml');
281
 
282
        $feed = new XML_Feed_Parser($content, true, true);
283
 
284
        $this->assertEquals('http://example.com/test/', $feed->title(0, 'base'));
285
    }
286
 
287
    function test_feed_title_xml_base_inherit_3_1() {
288
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_3.xml');
289
 
290
        $feed = new XML_Feed_Parser($content, true, true);
291
 
292
        $this->assertEquals('http://example.com/test/', $feed->title(0, 'base'));
293
    }
294
 
295
    function test_feed_title_xml_base_inherit_4_1() {
296
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_4.xml');
297
 
298
        $feed = new XML_Feed_Parser($content, true, true);
299
 
300
        $this->assertEquals('http://example.com/parent/', $feed->title(0, 'base'));
301
    }
302
 
303
    function test_http_channel_docs_base_content_location_1() {
304
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_docs_base_content_location.xml');
305
 
306
        $feed = new XML_Feed_Parser($content);
307
 
308
        $this->assertEquals('http://example.com/relative/uri', $feed->docs);
309
    }
310
 
311
    function test_http_channel_docs_base_docuri_1() {
312
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_docs_base_docuri.xml');
313
 
314
        $feed = new XML_Feed_Parser($content);
315
 
316
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->docs);
317
    }
318
 
319
    function test_http_channel_link_base_content_location_1() {
320
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_link_base_content_location.xml');
321
 
322
        $feed = new XML_Feed_Parser($content);
323
 
324
        $this->assertEquals('http://example.com/relative/uri', $feed->link);
325
    }
326
 
327
    function test_http_channel_link_base_docuri_1() {
328
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_link_base_docuri.xml');
329
 
330
        $feed = new XML_Feed_Parser($content);
331
 
332
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->link);
333
    }
334
 
335
    function test_http_entry_author_url_base_content_location_1() {
336
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_author_url_base_content_location.xml');
337
 
338
        $feed = new XML_Feed_Parser($content, true, true);
339
 
340
        $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->author(0, 'url'));
341
    }
342
 
343
    function test_http_entry_author_url_base_docuri_1() {
344
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_author_url_base_docuri.xml');
345
 
346
        $feed = new XML_Feed_Parser($content, true, true);
347
 
348
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->author(0, 'url'));
349
    }
350
 
351
    function test_http_entry_content_base64_base_content_location_1() {
352
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base64_base_content_location.xml');
353
 
354
        $feed = new XML_Feed_Parser($content, true, true);
355
 
356
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
357
    }
358
 
359
    function test_http_entry_content_base64_base_docuri_1() {
360
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base64_base_docuri.xml');
361
 
362
        $feed = new XML_Feed_Parser($content, true, true);
363
 
364
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
365
    }
366
 
367
    function test_http_entry_content_base_content_location_1() {
368
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base_content_location.xml');
369
 
370
        $feed = new XML_Feed_Parser($content, true, true);
371
 
372
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
373
    }
374
 
375
    function test_http_entry_content_base_docuri_1() {
376
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base_docuri.xml');
377
 
378
        $feed = new XML_Feed_Parser($content, true, true);
379
 
380
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
381
    }
382
 
383
    function test_http_entry_content_inline_base_content_location_1() {
384
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_inline_base_content_location.xml');
385
 
386
        $feed = new XML_Feed_Parser($content, true, true);
387
 
388
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
389
    }
390
 
391
    function test_http_entry_content_inline_base_docuri_1() {
392
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_inline_base_docuri.xml');
393
 
394
        $feed = new XML_Feed_Parser($content, true, true);
395
 
396
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value'));
397
    }
398
 
399
    function test_http_entry_contributor_url_base_content_location_1() {
400
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_contributor_url_base_content_location.xml');
401
 
402
        $feed = new XML_Feed_Parser($content, true, true);
403
 
404
        $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->contributors(0, 'url'));
405
    }
406
 
407
    function test_http_entry_contributor_url_base_docuri_1() {
408
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_contributor_url_base_docuri.xml');
409
 
410
        $feed = new XML_Feed_Parser($content, true, true);
411
 
412
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->contributors(0, 'url'));
413
    }
414
 
415
    function test_http_entry_id_base_content_location_1() {
416
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_id_base_content_location.xml');
417
 
418
        $feed = new XML_Feed_Parser($content, true, true);
419
 
420
        $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->id);
421
    }
422
 
423
    function test_http_entry_id_base_docuri_1() {
424
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_id_base_docuri.xml');
425
 
426
        $feed = new XML_Feed_Parser($content, true, true);
427
 
428
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->id);
429
    }
430
 
431
    function test_http_entry_link_base_content_location_1() {
432
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_link_base_content_location.xml');
433
 
434
        $feed = new XML_Feed_Parser($content, true, true);
435
 
436
        $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->links(0, 'href'));
437
    }
438
 
439
    function test_http_entry_link_base_docuri_1() {
440
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_link_base_docuri.xml');
441
 
442
        $feed = new XML_Feed_Parser($content, true, true);
443
 
444
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->links(0, 'href'));
445
    }
446
 
447
    function test_http_entry_summary_base64_base_content_location_1() {
448
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base64_base_content_location.xml');
449
 
450
        $feed = new XML_Feed_Parser($content, true, true);
451
 
452
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
453
    }
454
 
455
    function test_http_entry_summary_base64_base_docuri_1() {
456
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base64_base_docuri.xml');
457
 
458
        $feed = new XML_Feed_Parser($content, true, true);
459
 
460
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
461
    }
462
 
463
    function test_http_entry_summary_base_content_location_1() {
464
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base_content_location.xml');
465
 
466
        $feed = new XML_Feed_Parser($content, true, true);
467
 
468
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
469
    }
470
 
471
    function test_http_entry_summary_base_docuri_1() {
472
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base_docuri.xml');
473
 
474
        $feed = new XML_Feed_Parser($content, true, true);
475
 
476
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
477
    }
478
 
479
    function test_http_entry_summary_inline_base_content_location_1() {
480
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_inline_base_content_location.xml');
481
 
482
        $feed = new XML_Feed_Parser($content, true, true);
483
 
484
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
485
    }
486
 
487
    function test_http_entry_summary_inline_base_docuri_1() {
488
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_inline_base_docuri.xml');
489
 
490
        $feed = new XML_Feed_Parser($content, true, true);
491
 
492
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary);
493
    }
494
 
495
    function test_http_entry_title_base64_base_content_location_1() {
496
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base64_base_content_location.xml');
497
 
498
        $feed = new XML_Feed_Parser($content, true, true);
499
 
500
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
501
    }
502
 
503
    function test_http_entry_title_base64_base_docuri_1() {
504
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base64_base_docuri.xml');
505
 
506
        $feed = new XML_Feed_Parser($content, true, true);
507
 
508
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
509
    }
510
 
511
    function test_http_entry_title_base_content_location_1() {
512
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base_content_location.xml');
513
 
514
        $feed = new XML_Feed_Parser($content, true, true);
515
 
516
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
517
    }
518
 
519
    function test_http_entry_title_base_docuri_1() {
520
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base_docuri.xml');
521
 
522
        $feed = new XML_Feed_Parser($content, true, true);
523
 
524
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
525
    }
526
 
527
    function test_http_entry_title_inline_base_content_location_1() {
528
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_inline_base_content_location.xml');
529
 
530
        $feed = new XML_Feed_Parser($content, true, true);
531
 
532
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
533
    }
534
 
535
    function test_http_entry_title_inline_base_docuri_1() {
536
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_inline_base_docuri.xml');
537
 
538
        $feed = new XML_Feed_Parser($content, true, true);
539
 
540
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title);
541
    }
542
 
543
    function test_http_feed_author_url_base_content_location_1() {
544
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_url_base_content_location.xml');
545
 
546
        $feed = new XML_Feed_Parser($content, true, true);
547
 
548
        $this->assertEquals('http://example.com/relative/link', $feed->author(0, 'url'));
549
    }
550
 
551
    function test_http_feed_author_url_base_docuri_1() {
552
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_url_base_docuri.xml');
553
 
554
        $feed = new XML_Feed_Parser($content, true, true);
555
 
556
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->author(0, 'url'));
557
    }
558
 
559
    function test_http_feed_contributor_url_base_content_location_1() {
560
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_content_location.xml');
561
 
562
        $feed = new XML_Feed_Parser($content, true, true);
563
 
564
        $this->assertEquals('http://example.com/relative/link', $feed->contributors(0, 'url'));
565
    }
566
 
567
    function test_http_feed_contributor_url_base_docuri_1() {
568
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_docuri.xml');
569
 
570
        $feed = new XML_Feed_Parser($content, true, true);
571
 
572
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->contributors(0, 'url'));
573
    }
574
 
575
    function test_http_feed_copyright_base64_base_content_location_1() {
576
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base64_base_content_location.xml');
577
 
578
        $feed = new XML_Feed_Parser($content, true, true);
579
 
580
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright);
581
    }
582
 
583
    function test_http_feed_copyright_base64_base_docuri_1() {
584
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base64_base_docuri.xml');
585
 
586
        $feed = new XML_Feed_Parser($content, true, true);
587
 
588
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright);
589
    }
590
 
591
    function test_http_feed_copyright_base_content_location_1() {
592
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base_content_location.xml');
593
 
594
        $feed = new XML_Feed_Parser($content, true, true);
595
 
596
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright);
597
    }
598
 
599
    function test_http_feed_copyright_base_docuri_1() {
600
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base_docuri.xml');
601
 
602
        $feed = new XML_Feed_Parser($content, true, true);
603
 
604
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright);
605
    }
606
 
607
    function test_http_feed_copyright_inline_base_content_location_1() {
608
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_inline_base_content_location.xml');
609
 
610
        $feed = new XML_Feed_Parser($content, true, true);
611
 
612
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright);
613
    }
614
 
615
    function test_http_feed_copyright_inline_base_docuri_1() {
616
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_inline_base_docuri.xml');
617
 
618
        $feed = new XML_Feed_Parser($content, true, true);
619
 
620
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright);
621
    }
622
 
623
    function test_http_feed_generator_url_base_content_location_1() {
624
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_generator_url_base_content_location.xml');
625
 
626
        $feed = new XML_Feed_Parser($content, true, true);
627
 
628
        $this->assertEquals('http://example.com/relative/link', $feed->generator(0, 'url'));
629
    }
630
 
631
    function test_http_feed_generator_url_base_docuri_1() {
632
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_generator_url_base_docuri.xml');
633
 
634
        $feed = new XML_Feed_Parser($content, true, true);
635
 
636
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->generator(0, 'url'));
637
    }
638
 
639
    function test_http_feed_id_base_content_location_1() {
640
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_id_base_content_location.xml');
641
 
642
        $feed = new XML_Feed_Parser($content, true, true);
643
 
644
        $this->assertEquals('http://example.com/relative/link', $feed->id);
645
    }
646
 
647
    function test_http_feed_id_base_docuri_1() {
648
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_id_base_docuri.xml');
649
 
650
        $feed = new XML_Feed_Parser($content, true, true);
651
 
652
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->id);
653
    }
654
 
655
    function test_http_feed_info_base64_base_content_location_1() {
656
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base64_base_content_location.xml');
657
 
658
        $feed = new XML_Feed_Parser($content, true, true);
659
 
660
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info);
661
    }
662
 
663
    function test_http_feed_info_base64_base_docuri_1() {
664
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base64_base_docuri.xml');
665
 
666
        $feed = new XML_Feed_Parser($content, true, true);
667
 
668
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info);
669
    }
670
 
671
    function test_http_feed_info_base_content_location_1() {
672
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base_content_location.xml');
673
 
674
        $feed = new XML_Feed_Parser($content, true, true);
675
 
676
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info);
677
    }
678
 
679
    function test_http_feed_info_base_docuri_1() {
680
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base_docuri.xml');
681
 
682
        $feed = new XML_Feed_Parser($content, true, true);
683
 
684
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info);
685
    }
686
 
687
    function test_http_feed_info_inline_base_content_location_1() {
688
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_inline_base_content_location.xml');
689
 
690
        $feed = new XML_Feed_Parser($content, true, true);
691
 
692
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info);
693
    }
694
 
695
    function test_http_feed_info_inline_base_docuri_1() {
696
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_inline_base_docuri.xml');
697
 
698
        $feed = new XML_Feed_Parser($content, true, true);
699
 
700
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info);
701
    }
702
 
703
    function test_http_feed_link_base_content_location_1() {
704
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_base_content_location.xml');
705
 
706
        $feed = new XML_Feed_Parser($content, true, true);
707
 
708
        $this->assertEquals('http://example.com/relative/link', $feed->links(0, 'href'));
709
    }
710
 
711
    function test_http_feed_link_base_docuri_1() {
712
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_base_docuri.xml');
713
 
714
        $feed = new XML_Feed_Parser($content, true, true);
715
 
716
        $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->links(0, 'href'));
717
    }
718
 
719
    function test_http_feed_tagline_base64_base_content_location_1() {
720
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base64_base_content_location.xml');
721
 
722
        $feed = new XML_Feed_Parser($content, true, true);
723
 
724
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline);
725
    }
726
 
727
    function test_http_feed_tagline_base64_base_docuri_1() {
728
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base64_base_docuri.xml');
729
 
730
        $feed = new XML_Feed_Parser($content, true, true);
731
 
732
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline);
733
    }
734
 
735
    function test_http_feed_tagline_base_content_location_1() {
736
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base_content_location.xml');
737
 
738
        $feed = new XML_Feed_Parser($content, true, true);
739
 
740
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline);
741
    }
742
 
743
    function test_http_feed_tagline_base_docuri_1() {
744
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base_docuri.xml');
745
 
746
        $feed = new XML_Feed_Parser($content, true, true);
747
 
748
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline);
749
    }
750
 
751
    function test_http_feed_tagline_inline_base_content_location_1() {
752
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_inline_base_content_location.xml');
753
 
754
        $feed = new XML_Feed_Parser($content, true, true);
755
 
756
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline);
757
    }
758
 
759
    function test_http_feed_tagline_inline_base_docuri_1() {
760
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_inline_base_docuri.xml');
761
 
762
        $feed = new XML_Feed_Parser($content, true, true);
763
 
764
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline);
765
    }
766
 
767
    function test_http_feed_title_base64_base_content_location_1() {
768
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base64_base_content_location.xml');
769
 
770
        $feed = new XML_Feed_Parser($content, true, true);
771
 
772
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title);
773
    }
774
 
775
    function test_http_feed_title_base64_base_docuri_1() {
776
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base64_base_docuri.xml');
777
 
778
        $feed = new XML_Feed_Parser($content, true, true);
779
 
780
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title);
781
    }
782
 
783
    function test_http_feed_title_base_content_location_1() {
784
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base_content_location.xml');
785
 
786
        $feed = new XML_Feed_Parser($content, true, true);
787
 
788
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title);
789
    }
790
 
791
    function test_http_feed_title_base_docuri_1() {
792
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base_docuri.xml');
793
 
794
        $feed = new XML_Feed_Parser($content, true, true);
795
 
796
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title);
797
    }
798
 
799
    function test_http_feed_title_inline_base_content_location_1() {
800
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_inline_base_content_location.xml');
801
 
802
        $feed = new XML_Feed_Parser($content, true, true);
803
 
804
        $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title);
805
    }
806
 
807
    function test_http_feed_title_inline_base_docuri_1() {
808
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_inline_base_docuri.xml');
809
 
810
        $feed = new XML_Feed_Parser($content, true, true);
811
 
812
        $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title);
813
    }
814
 
815
    function test_http_item_body_base_content_location_1() {
816
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_body_base_content_location.xml');
817
 
818
        $feed = new XML_Feed_Parser($content);
819
 
820
        $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
821
    }
822
 
823
    function test_http_item_body_base_docuri_1() {
824
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_body_base_docuri.xml');
825
 
826
        $feed = new XML_Feed_Parser($content);
827
 
828
        $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
829
    }
830
 
831
    function test_http_item_comments_base_content_location_1() {
832
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_comments_base_content_location.xml');
833
 
834
        $feed = new XML_Feed_Parser($content);
835
 
836
        $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->comments);
837
    }
838
 
839
    function test_http_item_comments_base_docuri_1() {
840
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_comments_base_docuri.xml');
841
 
842
        $feed = new XML_Feed_Parser($content);
843
 
844
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->comments);
845
    }
846
 
847
    function test_http_item_content_encoded_base_content_location_1() {
848
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_content_encoded_base_content_location.xml');
849
 
850
        $feed = new XML_Feed_Parser($content);
851
 
852
        $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
853
    }
854
 
855
    function test_http_item_content_encoded_base_docuri_1() {
856
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_content_encoded_base_docuri.xml');
857
 
858
        $feed = new XML_Feed_Parser($content);
859
 
860
        $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
861
    }
862
 
863
    function test_http_item_description_base_content_location_1() {
864
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_description_base_content_location.xml');
865
 
866
        $feed = new XML_Feed_Parser($content);
867
 
868
        $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->description);
869
    }
870
 
871
    function test_http_item_description_base_docuri_1() {
872
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_description_base_docuri.xml');
873
 
874
        $feed = new XML_Feed_Parser($content);
875
 
876
        $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->description);
877
    }
878
 
879
    function test_http_item_fullitem_base_content_location_1() {
880
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_fullitem_base_content_location.xml');
881
 
882
        $feed = new XML_Feed_Parser($content);
883
 
884
        $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
885
    }
886
 
887
    function test_http_item_fullitem_base_docuri_1() {
888
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_fullitem_base_docuri.xml');
889
 
890
        $feed = new XML_Feed_Parser($content);
891
 
892
        $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
893
    }
894
 
895
    function test_http_item_link_base_content_location_1() {
896
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_link_base_content_location.xml');
897
 
898
        $feed = new XML_Feed_Parser($content);
899
 
900
        $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->link);
901
    }
902
 
903
    function test_http_item_link_base_docuri_1() {
904
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_link_base_docuri.xml');
905
 
906
        $feed = new XML_Feed_Parser($content);
907
 
908
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->link);
909
    }
910
 
911
    function test_http_item_wfw_comment_base_content_location_1() {
912
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_comment_base_content_location.xml');
913
 
914
        $feed = new XML_Feed_Parser($content);
915
 
916
        $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->wfw_comment);
917
    }
918
 
919
    function test_http_item_wfw_comment_base_docuri_1() {
920
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_comment_base_docuri.xml');
921
 
922
        $feed = new XML_Feed_Parser($content);
923
 
924
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->wfw_comment);
925
    }
926
 
927
    function test_http_item_wfw_commentRSS_base_content_location_1() {
928
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_commentRSS_base_content_location.xml');
929
 
930
        $feed = new XML_Feed_Parser($content);
931
 
932
        $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->wfw_commentrss);
933
    }
934
 
935
    function test_http_item_wfw_commentRSS_base_docuri_1() {
936
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_commentRSS_base_docuri.xml');
937
 
938
        $feed = new XML_Feed_Parser($content);
939
 
940
        $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->wfw_commentrss);
941
    }
942
 
943
    function test_http_item_xhtml_body_base_content_location_1() {
944
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_xhtml_body_base_content_location.xml');
945
 
946
        $feed = new XML_Feed_Parser($content);
947
 
948
        $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
949
    }
950
 
951
    function test_http_item_xhtml_body_base_docuri_1() {
952
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_xhtml_body_base_docuri.xml');
953
 
954
        $feed = new XML_Feed_Parser($content);
955
 
956
        $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value'));
957
    }
958
 
959
    function test_http_relative_xml_base_1() {
960
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_relative_xml_base.xml');
961
 
962
        $feed = new XML_Feed_Parser($content, true, true);
963
 
964
        $this->assertEquals('http://example.com/feed/entry/title/', $feed->getEntryByOffset(0)->title(0, 'base'));
965
    }
966
 
967
    function test_http_relative_xml_base_2_1() {
968
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_relative_xml_base_2.xml');
969
 
970
        $feed = new XML_Feed_Parser($content, true, true);
971
 
972
        $this->assertEquals('http://example.com/entry/', $feed->getEntryByOffset(0)->title(0, 'base'));
973
    }
974
 
975
    function test_malformed_base_1() {
976
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/malformed_base.xml');
977
 
978
        $feed = new XML_Feed_Parser($content, true, true);
979
 
980
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
981
    }
982
 
983
    function test_relative_xml_base_1() {
984
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/relative_xml_base.xml');
985
 
986
        $feed = new XML_Feed_Parser($content, true, true);
987
 
988
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
989
    }
990
 
991
    function test_relative_xml_base_2_1() {
992
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/relative_xml_base_2.xml');
993
 
994
        $feed = new XML_Feed_Parser($content, true, true);
995
 
996
        $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base'));
997
    }
998
}
999
?>