1 | <?php |
---|
2 | |
---|
3 | require_once 'XML_Feed_Parser_TestCase.php'; |
---|
4 | |
---|
5 | class base_TestCase extends XML_Feed_Parser_Converted_TestCase { |
---|
6 | |
---|
7 | function test_cdf_item_abstract_xml_base_1 () { |
---|
8 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/cdf_item_abstract_xml_base.xml'); |
---|
9 | try { |
---|
10 | $feed = new XML_Feed_Parser($content); |
---|
11 | } catch (XML_Feed_Parser_Exception $e) { |
---|
12 | $this->assertTrue(false); |
---|
13 | return; |
---|
14 | } |
---|
15 | $this->assertEquals('http://base.example.org/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
16 | } |
---|
17 | |
---|
18 | function test_entry_content_xml_base_1 () { |
---|
19 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base.xml'); |
---|
20 | try { |
---|
21 | $feed = new XML_Feed_Parser($content); |
---|
22 | } catch (XML_Feed_Parser_Exception $e) { |
---|
23 | $this->assertTrue(false); |
---|
24 | return; |
---|
25 | } |
---|
26 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base')); |
---|
27 | } |
---|
28 | |
---|
29 | function test_entry_content_xml_base_inherit_1 () { |
---|
30 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit.xml'); |
---|
31 | try { |
---|
32 | $feed = new XML_Feed_Parser($content); |
---|
33 | } catch (XML_Feed_Parser_Exception $e) { |
---|
34 | $this->assertTrue(false); |
---|
35 | return; |
---|
36 | } |
---|
37 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base')); |
---|
38 | } |
---|
39 | |
---|
40 | function test_entry_content_xml_base_inherit_2_1 () { |
---|
41 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_2.xml'); |
---|
42 | try { |
---|
43 | $feed = new XML_Feed_Parser($content); |
---|
44 | } catch (XML_Feed_Parser_Exception $e) { |
---|
45 | $this->assertTrue(false); |
---|
46 | return; |
---|
47 | } |
---|
48 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base')); |
---|
49 | } |
---|
50 | |
---|
51 | function test_entry_content_xml_base_inherit_3_1 () { |
---|
52 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_3.xml'); |
---|
53 | try { |
---|
54 | $feed = new XML_Feed_Parser($content); |
---|
55 | } catch (XML_Feed_Parser_Exception $e) { |
---|
56 | $this->assertTrue(false); |
---|
57 | return; |
---|
58 | } |
---|
59 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->content(0, 'base')); |
---|
60 | } |
---|
61 | |
---|
62 | function test_entry_content_xml_base_inherit_4_1 () { |
---|
63 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_content_xml_base_inherit_4.xml'); |
---|
64 | try { |
---|
65 | $feed = new XML_Feed_Parser($content); |
---|
66 | } catch (XML_Feed_Parser_Exception $e) { |
---|
67 | $this->assertTrue(false); |
---|
68 | return; |
---|
69 | } |
---|
70 | $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->content(0, 'base')); |
---|
71 | } |
---|
72 | |
---|
73 | function test_entry_summary_xml_base_1 () { |
---|
74 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base.xml'); |
---|
75 | try { |
---|
76 | $feed = new XML_Feed_Parser($content); |
---|
77 | } catch (XML_Feed_Parser_Exception $e) { |
---|
78 | $this->assertTrue(false); |
---|
79 | return; |
---|
80 | } |
---|
81 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
82 | } |
---|
83 | |
---|
84 | function test_entry_summary_xml_base_inherit_1 () { |
---|
85 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit.xml'); |
---|
86 | try { |
---|
87 | $feed = new XML_Feed_Parser($content); |
---|
88 | } catch (XML_Feed_Parser_Exception $e) { |
---|
89 | $this->assertTrue(false); |
---|
90 | return; |
---|
91 | } |
---|
92 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
93 | } |
---|
94 | |
---|
95 | function test_entry_summary_xml_base_inherit_2_1 () { |
---|
96 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_2.xml'); |
---|
97 | try { |
---|
98 | $feed = new XML_Feed_Parser($content); |
---|
99 | } catch (XML_Feed_Parser_Exception $e) { |
---|
100 | $this->assertTrue(false); |
---|
101 | return; |
---|
102 | } |
---|
103 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
104 | } |
---|
105 | |
---|
106 | function test_entry_summary_xml_base_inherit_3_1 () { |
---|
107 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_3.xml'); |
---|
108 | try { |
---|
109 | $feed = new XML_Feed_Parser($content); |
---|
110 | } catch (XML_Feed_Parser_Exception $e) { |
---|
111 | $this->assertTrue(false); |
---|
112 | return; |
---|
113 | } |
---|
114 | $this->assertEquals('http://example.com/summary/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
115 | } |
---|
116 | |
---|
117 | function test_entry_summary_xml_base_inherit_4_1 () { |
---|
118 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_summary_xml_base_inherit_4.xml'); |
---|
119 | try { |
---|
120 | $feed = new XML_Feed_Parser($content); |
---|
121 | } catch (XML_Feed_Parser_Exception $e) { |
---|
122 | $this->assertTrue(false); |
---|
123 | return; |
---|
124 | } |
---|
125 | $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->summary(0, 'base')); |
---|
126 | } |
---|
127 | |
---|
128 | function test_entry_title_xml_base_1 () { |
---|
129 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base.xml'); |
---|
130 | try { |
---|
131 | $feed = new XML_Feed_Parser($content); |
---|
132 | } catch (XML_Feed_Parser_Exception $e) { |
---|
133 | $this->assertTrue(false); |
---|
134 | return; |
---|
135 | } |
---|
136 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
137 | } |
---|
138 | |
---|
139 | function test_entry_title_xml_base_inherit_1 () { |
---|
140 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit.xml'); |
---|
141 | try { |
---|
142 | $feed = new XML_Feed_Parser($content); |
---|
143 | } catch (XML_Feed_Parser_Exception $e) { |
---|
144 | $this->assertTrue(false); |
---|
145 | return; |
---|
146 | } |
---|
147 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
148 | } |
---|
149 | |
---|
150 | function test_entry_title_xml_base_inherit_2_1 () { |
---|
151 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_2.xml'); |
---|
152 | try { |
---|
153 | $feed = new XML_Feed_Parser($content); |
---|
154 | } catch (XML_Feed_Parser_Exception $e) { |
---|
155 | $this->assertTrue(false); |
---|
156 | return; |
---|
157 | } |
---|
158 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
159 | } |
---|
160 | |
---|
161 | function test_entry_title_xml_base_inherit_3_1 () { |
---|
162 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_3.xml'); |
---|
163 | try { |
---|
164 | $feed = new XML_Feed_Parser($content); |
---|
165 | } catch (XML_Feed_Parser_Exception $e) { |
---|
166 | $this->assertTrue(false); |
---|
167 | return; |
---|
168 | } |
---|
169 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
170 | } |
---|
171 | |
---|
172 | function test_entry_title_xml_base_inherit_4_1 () { |
---|
173 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/entry_title_xml_base_inherit_4.xml'); |
---|
174 | try { |
---|
175 | $feed = new XML_Feed_Parser($content); |
---|
176 | } catch (XML_Feed_Parser_Exception $e) { |
---|
177 | $this->assertTrue(false); |
---|
178 | return; |
---|
179 | } |
---|
180 | $this->assertEquals('http://example.com/parent/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
181 | } |
---|
182 | |
---|
183 | function test_feed_copyright_xml_base_1 () { |
---|
184 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base.xml'); |
---|
185 | try { |
---|
186 | $feed = new XML_Feed_Parser($content); |
---|
187 | } catch (XML_Feed_Parser_Exception $e) { |
---|
188 | $this->assertTrue(false); |
---|
189 | return; |
---|
190 | } |
---|
191 | $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base')); |
---|
192 | } |
---|
193 | |
---|
194 | function test_feed_copyright_xml_base_inherit_1 () { |
---|
195 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit.xml'); |
---|
196 | try { |
---|
197 | $feed = new XML_Feed_Parser($content); |
---|
198 | } catch (XML_Feed_Parser_Exception $e) { |
---|
199 | $this->assertTrue(false); |
---|
200 | return; |
---|
201 | } |
---|
202 | $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base')); |
---|
203 | } |
---|
204 | |
---|
205 | function test_feed_copyright_xml_base_inherit_2_1 () { |
---|
206 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_2.xml'); |
---|
207 | try { |
---|
208 | $feed = new XML_Feed_Parser($content); |
---|
209 | } catch (XML_Feed_Parser_Exception $e) { |
---|
210 | $this->assertTrue(false); |
---|
211 | return; |
---|
212 | } |
---|
213 | $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base')); |
---|
214 | } |
---|
215 | |
---|
216 | function test_feed_copyright_xml_base_inherit_3_1 () { |
---|
217 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_3.xml'); |
---|
218 | try { |
---|
219 | $feed = new XML_Feed_Parser($content); |
---|
220 | } catch (XML_Feed_Parser_Exception $e) { |
---|
221 | $this->assertTrue(false); |
---|
222 | return; |
---|
223 | } |
---|
224 | $this->assertEquals('http://example.com/test/', $feed->copyright(0, 'base')); |
---|
225 | } |
---|
226 | |
---|
227 | function test_feed_copyright_xml_base_inherit_4_1 () { |
---|
228 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_copyright_xml_base_inherit_4.xml'); |
---|
229 | try { |
---|
230 | $feed = new XML_Feed_Parser($content); |
---|
231 | } catch (XML_Feed_Parser_Exception $e) { |
---|
232 | $this->assertTrue(false); |
---|
233 | return; |
---|
234 | } |
---|
235 | $this->assertEquals('http://example.com/parent/', $feed->copyright(0, 'base')); |
---|
236 | } |
---|
237 | |
---|
238 | function test_feed_info_xml_base_1 () { |
---|
239 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base.xml'); |
---|
240 | try { |
---|
241 | $feed = new XML_Feed_Parser($content); |
---|
242 | } catch (XML_Feed_Parser_Exception $e) { |
---|
243 | $this->assertTrue(false); |
---|
244 | return; |
---|
245 | } |
---|
246 | $this->assertEquals('http://example.com/test/', $feed->info(0, 'base')); |
---|
247 | } |
---|
248 | |
---|
249 | function test_feed_info_xml_base_inherit_1 () { |
---|
250 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit.xml'); |
---|
251 | try { |
---|
252 | $feed = new XML_Feed_Parser($content); |
---|
253 | } catch (XML_Feed_Parser_Exception $e) { |
---|
254 | $this->assertTrue(false); |
---|
255 | return; |
---|
256 | } |
---|
257 | $this->assertEquals('http://example.com/test/', $feed->info(0, 'base')); |
---|
258 | } |
---|
259 | |
---|
260 | function test_feed_info_xml_base_inherit_2_1 () { |
---|
261 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_2.xml'); |
---|
262 | try { |
---|
263 | $feed = new XML_Feed_Parser($content); |
---|
264 | } catch (XML_Feed_Parser_Exception $e) { |
---|
265 | $this->assertTrue(false); |
---|
266 | return; |
---|
267 | } |
---|
268 | $this->assertEquals('http://example.com/test/', $feed->info(0, 'base')); |
---|
269 | } |
---|
270 | |
---|
271 | function test_feed_info_xml_base_inherit_3_1 () { |
---|
272 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_3.xml'); |
---|
273 | try { |
---|
274 | $feed = new XML_Feed_Parser($content); |
---|
275 | } catch (XML_Feed_Parser_Exception $e) { |
---|
276 | $this->assertTrue(false); |
---|
277 | return; |
---|
278 | } |
---|
279 | $this->assertEquals('http://example.com/info/', $feed->info(0, 'base')); |
---|
280 | } |
---|
281 | |
---|
282 | function test_feed_info_xml_base_inherit_4_1 () { |
---|
283 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_info_xml_base_inherit_4.xml'); |
---|
284 | try { |
---|
285 | $feed = new XML_Feed_Parser($content); |
---|
286 | } catch (XML_Feed_Parser_Exception $e) { |
---|
287 | $this->assertTrue(false); |
---|
288 | return; |
---|
289 | } |
---|
290 | $this->assertEquals('http://example.com/parent/', $feed->info(0, 'base')); |
---|
291 | } |
---|
292 | |
---|
293 | function test_feed_tagline_xml_base_1 () { |
---|
294 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base.xml'); |
---|
295 | try { |
---|
296 | $feed = new XML_Feed_Parser($content); |
---|
297 | } catch (XML_Feed_Parser_Exception $e) { |
---|
298 | $this->assertTrue(false); |
---|
299 | return; |
---|
300 | } |
---|
301 | $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base')); |
---|
302 | } |
---|
303 | |
---|
304 | function test_feed_tagline_xml_base_inherit_1 () { |
---|
305 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit.xml'); |
---|
306 | try { |
---|
307 | $feed = new XML_Feed_Parser($content); |
---|
308 | } catch (XML_Feed_Parser_Exception $e) { |
---|
309 | $this->assertTrue(false); |
---|
310 | return; |
---|
311 | } |
---|
312 | $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base')); |
---|
313 | } |
---|
314 | |
---|
315 | function test_feed_tagline_xml_base_inherit_2_1 () { |
---|
316 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_2.xml'); |
---|
317 | try { |
---|
318 | $feed = new XML_Feed_Parser($content); |
---|
319 | } catch (XML_Feed_Parser_Exception $e) { |
---|
320 | $this->assertTrue(false); |
---|
321 | return; |
---|
322 | } |
---|
323 | $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base')); |
---|
324 | } |
---|
325 | |
---|
326 | function test_feed_tagline_xml_base_inherit_3_1 () { |
---|
327 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_3.xml'); |
---|
328 | try { |
---|
329 | $feed = new XML_Feed_Parser($content); |
---|
330 | } catch (XML_Feed_Parser_Exception $e) { |
---|
331 | $this->assertTrue(false); |
---|
332 | return; |
---|
333 | } |
---|
334 | $this->assertEquals('http://example.com/test/', $feed->tagline(0, 'base')); |
---|
335 | } |
---|
336 | |
---|
337 | function test_feed_tagline_xml_base_inherit_4_1 () { |
---|
338 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_tagline_xml_base_inherit_4.xml'); |
---|
339 | try { |
---|
340 | $feed = new XML_Feed_Parser($content); |
---|
341 | } catch (XML_Feed_Parser_Exception $e) { |
---|
342 | $this->assertTrue(false); |
---|
343 | return; |
---|
344 | } |
---|
345 | $this->assertEquals('http://example.com/parent/', $feed->tagline(0, 'base')); |
---|
346 | } |
---|
347 | |
---|
348 | function test_feed_title_xml_base_1 () { |
---|
349 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base.xml'); |
---|
350 | try { |
---|
351 | $feed = new XML_Feed_Parser($content); |
---|
352 | } catch (XML_Feed_Parser_Exception $e) { |
---|
353 | $this->assertTrue(false); |
---|
354 | return; |
---|
355 | } |
---|
356 | $this->assertEquals('http://example.com/test/', $feed->title(0, 'base')); |
---|
357 | } |
---|
358 | |
---|
359 | function test_feed_title_xml_base_inherit_1 () { |
---|
360 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit.xml'); |
---|
361 | try { |
---|
362 | $feed = new XML_Feed_Parser($content); |
---|
363 | } catch (XML_Feed_Parser_Exception $e) { |
---|
364 | $this->assertTrue(false); |
---|
365 | return; |
---|
366 | } |
---|
367 | $this->assertEquals('http://example.com/test/', $feed->title(0, 'base')); |
---|
368 | } |
---|
369 | |
---|
370 | function test_feed_title_xml_base_inherit_2_1 () { |
---|
371 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_2.xml'); |
---|
372 | try { |
---|
373 | $feed = new XML_Feed_Parser($content); |
---|
374 | } catch (XML_Feed_Parser_Exception $e) { |
---|
375 | $this->assertTrue(false); |
---|
376 | return; |
---|
377 | } |
---|
378 | $this->assertEquals('http://example.com/test/', $feed->title(0, 'base')); |
---|
379 | } |
---|
380 | |
---|
381 | function test_feed_title_xml_base_inherit_3_1 () { |
---|
382 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_3.xml'); |
---|
383 | try { |
---|
384 | $feed = new XML_Feed_Parser($content); |
---|
385 | } catch (XML_Feed_Parser_Exception $e) { |
---|
386 | $this->assertTrue(false); |
---|
387 | return; |
---|
388 | } |
---|
389 | $this->assertEquals('http://example.com/test/', $feed->title(0, 'base')); |
---|
390 | } |
---|
391 | |
---|
392 | function test_feed_title_xml_base_inherit_4_1 () { |
---|
393 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_4.xml'); |
---|
394 | try { |
---|
395 | $feed = new XML_Feed_Parser($content); |
---|
396 | } catch (XML_Feed_Parser_Exception $e) { |
---|
397 | $this->assertTrue(false); |
---|
398 | return; |
---|
399 | } |
---|
400 | $this->assertEquals('http://example.com/parent/', $feed->title(0, 'base')); |
---|
401 | } |
---|
402 | |
---|
403 | function test_http_channel_docs_base_content_location_1 () { |
---|
404 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_docs_base_content_location.xml'); |
---|
405 | try { |
---|
406 | $feed = new XML_Feed_Parser($content); |
---|
407 | } catch (XML_Feed_Parser_Exception $e) { |
---|
408 | $this->assertTrue(false); |
---|
409 | return; |
---|
410 | } |
---|
411 | $this->assertEquals('http://example.com/relative/uri', $feed->docs); |
---|
412 | } |
---|
413 | |
---|
414 | function test_http_channel_docs_base_docuri_1 () { |
---|
415 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_docs_base_docuri.xml'); |
---|
416 | try { |
---|
417 | $feed = new XML_Feed_Parser($content); |
---|
418 | } catch (XML_Feed_Parser_Exception $e) { |
---|
419 | $this->assertTrue(false); |
---|
420 | return; |
---|
421 | } |
---|
422 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->docs); |
---|
423 | } |
---|
424 | |
---|
425 | function test_http_channel_link_base_content_location_1 () { |
---|
426 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_link_base_content_location.xml'); |
---|
427 | try { |
---|
428 | $feed = new XML_Feed_Parser($content); |
---|
429 | } catch (XML_Feed_Parser_Exception $e) { |
---|
430 | $this->assertTrue(false); |
---|
431 | return; |
---|
432 | } |
---|
433 | $this->assertEquals('http://example.com/relative/uri', $feed->link); |
---|
434 | } |
---|
435 | |
---|
436 | function test_http_channel_link_base_docuri_1 () { |
---|
437 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_channel_link_base_docuri.xml'); |
---|
438 | try { |
---|
439 | $feed = new XML_Feed_Parser($content); |
---|
440 | } catch (XML_Feed_Parser_Exception $e) { |
---|
441 | $this->assertTrue(false); |
---|
442 | return; |
---|
443 | } |
---|
444 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->link); |
---|
445 | } |
---|
446 | |
---|
447 | function test_http_entry_author_url_base_content_location_1 () { |
---|
448 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_author_url_base_content_location.xml'); |
---|
449 | try { |
---|
450 | $feed = new XML_Feed_Parser($content); |
---|
451 | } catch (XML_Feed_Parser_Exception $e) { |
---|
452 | $this->assertTrue(false); |
---|
453 | return; |
---|
454 | } |
---|
455 | $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->author(0, 'url')); |
---|
456 | } |
---|
457 | |
---|
458 | function test_http_entry_author_url_base_docuri_1 () { |
---|
459 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_author_url_base_docuri.xml'); |
---|
460 | try { |
---|
461 | $feed = new XML_Feed_Parser($content); |
---|
462 | } catch (XML_Feed_Parser_Exception $e) { |
---|
463 | $this->assertTrue(false); |
---|
464 | return; |
---|
465 | } |
---|
466 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->author(0, 'url')); |
---|
467 | } |
---|
468 | |
---|
469 | function test_http_entry_content_base64_base_content_location_1 () { |
---|
470 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base64_base_content_location.xml'); |
---|
471 | try { |
---|
472 | $feed = new XML_Feed_Parser($content); |
---|
473 | } catch (XML_Feed_Parser_Exception $e) { |
---|
474 | $this->assertTrue(false); |
---|
475 | return; |
---|
476 | } |
---|
477 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
478 | } |
---|
479 | |
---|
480 | function test_http_entry_content_base64_base_docuri_1 () { |
---|
481 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base64_base_docuri.xml'); |
---|
482 | try { |
---|
483 | $feed = new XML_Feed_Parser($content); |
---|
484 | } catch (XML_Feed_Parser_Exception $e) { |
---|
485 | $this->assertTrue(false); |
---|
486 | return; |
---|
487 | } |
---|
488 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
489 | } |
---|
490 | |
---|
491 | function test_http_entry_content_base_content_location_1 () { |
---|
492 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base_content_location.xml'); |
---|
493 | try { |
---|
494 | $feed = new XML_Feed_Parser($content); |
---|
495 | } catch (XML_Feed_Parser_Exception $e) { |
---|
496 | $this->assertTrue(false); |
---|
497 | return; |
---|
498 | } |
---|
499 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
500 | } |
---|
501 | |
---|
502 | function test_http_entry_content_base_docuri_1 () { |
---|
503 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_base_docuri.xml'); |
---|
504 | try { |
---|
505 | $feed = new XML_Feed_Parser($content); |
---|
506 | } catch (XML_Feed_Parser_Exception $e) { |
---|
507 | $this->assertTrue(false); |
---|
508 | return; |
---|
509 | } |
---|
510 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
511 | } |
---|
512 | |
---|
513 | function test_http_entry_content_inline_base_content_location_1 () { |
---|
514 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_inline_base_content_location.xml'); |
---|
515 | try { |
---|
516 | $feed = new XML_Feed_Parser($content); |
---|
517 | } catch (XML_Feed_Parser_Exception $e) { |
---|
518 | $this->assertTrue(false); |
---|
519 | return; |
---|
520 | } |
---|
521 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
522 | } |
---|
523 | |
---|
524 | function test_http_entry_content_inline_base_docuri_1 () { |
---|
525 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_content_inline_base_docuri.xml'); |
---|
526 | try { |
---|
527 | $feed = new XML_Feed_Parser($content); |
---|
528 | } catch (XML_Feed_Parser_Exception $e) { |
---|
529 | $this->assertTrue(false); |
---|
530 | return; |
---|
531 | } |
---|
532 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
533 | } |
---|
534 | |
---|
535 | function test_http_entry_contributor_url_base_content_location_1 () { |
---|
536 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_contributor_url_base_content_location.xml'); |
---|
537 | try { |
---|
538 | $feed = new XML_Feed_Parser($content); |
---|
539 | } catch (XML_Feed_Parser_Exception $e) { |
---|
540 | $this->assertTrue(false); |
---|
541 | return; |
---|
542 | } |
---|
543 | $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->contributors(0, 'url')); |
---|
544 | } |
---|
545 | |
---|
546 | function test_http_entry_contributor_url_base_docuri_1 () { |
---|
547 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_contributor_url_base_docuri.xml'); |
---|
548 | try { |
---|
549 | $feed = new XML_Feed_Parser($content); |
---|
550 | } catch (XML_Feed_Parser_Exception $e) { |
---|
551 | $this->assertTrue(false); |
---|
552 | return; |
---|
553 | } |
---|
554 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->contributors(0, 'url')); |
---|
555 | } |
---|
556 | |
---|
557 | function test_http_entry_id_base_content_location_1 () { |
---|
558 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_id_base_content_location.xml'); |
---|
559 | try { |
---|
560 | $feed = new XML_Feed_Parser($content); |
---|
561 | } catch (XML_Feed_Parser_Exception $e) { |
---|
562 | $this->assertTrue(false); |
---|
563 | return; |
---|
564 | } |
---|
565 | $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->id); |
---|
566 | } |
---|
567 | |
---|
568 | function test_http_entry_id_base_docuri_1 () { |
---|
569 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_id_base_docuri.xml'); |
---|
570 | try { |
---|
571 | $feed = new XML_Feed_Parser($content); |
---|
572 | } catch (XML_Feed_Parser_Exception $e) { |
---|
573 | $this->assertTrue(false); |
---|
574 | return; |
---|
575 | } |
---|
576 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->id); |
---|
577 | } |
---|
578 | |
---|
579 | function test_http_entry_link_base_content_location_1 () { |
---|
580 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_link_base_content_location.xml'); |
---|
581 | try { |
---|
582 | $feed = new XML_Feed_Parser($content); |
---|
583 | } catch (XML_Feed_Parser_Exception $e) { |
---|
584 | $this->assertTrue(false); |
---|
585 | return; |
---|
586 | } |
---|
587 | $this->assertEquals('http://example.com/relative/link', $feed->getEntryByOffset(0)->links(0, 'href')); |
---|
588 | } |
---|
589 | |
---|
590 | function test_http_entry_link_base_docuri_1 () { |
---|
591 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_link_base_docuri.xml'); |
---|
592 | try { |
---|
593 | $feed = new XML_Feed_Parser($content); |
---|
594 | } catch (XML_Feed_Parser_Exception $e) { |
---|
595 | $this->assertTrue(false); |
---|
596 | return; |
---|
597 | } |
---|
598 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->getEntryByOffset(0)->links(0, 'href')); |
---|
599 | } |
---|
600 | |
---|
601 | function test_http_entry_summary_base64_base_content_location_1 () { |
---|
602 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base64_base_content_location.xml'); |
---|
603 | try { |
---|
604 | $feed = new XML_Feed_Parser($content); |
---|
605 | } catch (XML_Feed_Parser_Exception $e) { |
---|
606 | $this->assertTrue(false); |
---|
607 | return; |
---|
608 | } |
---|
609 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
610 | } |
---|
611 | |
---|
612 | function test_http_entry_summary_base64_base_docuri_1 () { |
---|
613 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base64_base_docuri.xml'); |
---|
614 | try { |
---|
615 | $feed = new XML_Feed_Parser($content); |
---|
616 | } catch (XML_Feed_Parser_Exception $e) { |
---|
617 | $this->assertTrue(false); |
---|
618 | return; |
---|
619 | } |
---|
620 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
621 | } |
---|
622 | |
---|
623 | function test_http_entry_summary_base_content_location_1 () { |
---|
624 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base_content_location.xml'); |
---|
625 | try { |
---|
626 | $feed = new XML_Feed_Parser($content); |
---|
627 | } catch (XML_Feed_Parser_Exception $e) { |
---|
628 | $this->assertTrue(false); |
---|
629 | return; |
---|
630 | } |
---|
631 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
632 | } |
---|
633 | |
---|
634 | function test_http_entry_summary_base_docuri_1 () { |
---|
635 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_base_docuri.xml'); |
---|
636 | try { |
---|
637 | $feed = new XML_Feed_Parser($content); |
---|
638 | } catch (XML_Feed_Parser_Exception $e) { |
---|
639 | $this->assertTrue(false); |
---|
640 | return; |
---|
641 | } |
---|
642 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
643 | } |
---|
644 | |
---|
645 | function test_http_entry_summary_inline_base_content_location_1 () { |
---|
646 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_inline_base_content_location.xml'); |
---|
647 | try { |
---|
648 | $feed = new XML_Feed_Parser($content); |
---|
649 | } catch (XML_Feed_Parser_Exception $e) { |
---|
650 | $this->assertTrue(false); |
---|
651 | return; |
---|
652 | } |
---|
653 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
654 | } |
---|
655 | |
---|
656 | function test_http_entry_summary_inline_base_docuri_1 () { |
---|
657 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_summary_inline_base_docuri.xml'); |
---|
658 | try { |
---|
659 | $feed = new XML_Feed_Parser($content); |
---|
660 | } catch (XML_Feed_Parser_Exception $e) { |
---|
661 | $this->assertTrue(false); |
---|
662 | return; |
---|
663 | } |
---|
664 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->summary); |
---|
665 | } |
---|
666 | |
---|
667 | function test_http_entry_title_base64_base_content_location_1 () { |
---|
668 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base64_base_content_location.xml'); |
---|
669 | try { |
---|
670 | $feed = new XML_Feed_Parser($content); |
---|
671 | } catch (XML_Feed_Parser_Exception $e) { |
---|
672 | $this->assertTrue(false); |
---|
673 | return; |
---|
674 | } |
---|
675 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
676 | } |
---|
677 | |
---|
678 | function test_http_entry_title_base64_base_docuri_1 () { |
---|
679 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base64_base_docuri.xml'); |
---|
680 | try { |
---|
681 | $feed = new XML_Feed_Parser($content); |
---|
682 | } catch (XML_Feed_Parser_Exception $e) { |
---|
683 | $this->assertTrue(false); |
---|
684 | return; |
---|
685 | } |
---|
686 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
687 | } |
---|
688 | |
---|
689 | function test_http_entry_title_base_content_location_1 () { |
---|
690 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base_content_location.xml'); |
---|
691 | try { |
---|
692 | $feed = new XML_Feed_Parser($content); |
---|
693 | } catch (XML_Feed_Parser_Exception $e) { |
---|
694 | $this->assertTrue(false); |
---|
695 | return; |
---|
696 | } |
---|
697 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
698 | } |
---|
699 | |
---|
700 | function test_http_entry_title_base_docuri_1 () { |
---|
701 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_base_docuri.xml'); |
---|
702 | try { |
---|
703 | $feed = new XML_Feed_Parser($content); |
---|
704 | } catch (XML_Feed_Parser_Exception $e) { |
---|
705 | $this->assertTrue(false); |
---|
706 | return; |
---|
707 | } |
---|
708 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
709 | } |
---|
710 | |
---|
711 | function test_http_entry_title_inline_base_content_location_1 () { |
---|
712 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_inline_base_content_location.xml'); |
---|
713 | try { |
---|
714 | $feed = new XML_Feed_Parser($content); |
---|
715 | } catch (XML_Feed_Parser_Exception $e) { |
---|
716 | $this->assertTrue(false); |
---|
717 | return; |
---|
718 | } |
---|
719 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
720 | } |
---|
721 | |
---|
722 | function test_http_entry_title_inline_base_docuri_1 () { |
---|
723 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_entry_title_inline_base_docuri.xml'); |
---|
724 | try { |
---|
725 | $feed = new XML_Feed_Parser($content); |
---|
726 | } catch (XML_Feed_Parser_Exception $e) { |
---|
727 | $this->assertTrue(false); |
---|
728 | return; |
---|
729 | } |
---|
730 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->getEntryByOffset(0)->title); |
---|
731 | } |
---|
732 | |
---|
733 | function test_http_feed_author_url_base_content_location_1 () { |
---|
734 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_url_base_content_location.xml'); |
---|
735 | try { |
---|
736 | $feed = new XML_Feed_Parser($content); |
---|
737 | } catch (XML_Feed_Parser_Exception $e) { |
---|
738 | $this->assertTrue(false); |
---|
739 | return; |
---|
740 | } |
---|
741 | $this->assertEquals('http://example.com/relative/link', $feed->author(0, 'url')); |
---|
742 | } |
---|
743 | |
---|
744 | function test_http_feed_author_url_base_docuri_1 () { |
---|
745 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_url_base_docuri.xml'); |
---|
746 | try { |
---|
747 | $feed = new XML_Feed_Parser($content); |
---|
748 | } catch (XML_Feed_Parser_Exception $e) { |
---|
749 | $this->assertTrue(false); |
---|
750 | return; |
---|
751 | } |
---|
752 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->author(0, 'url')); |
---|
753 | } |
---|
754 | |
---|
755 | function test_http_feed_contributor_url_base_content_location_1 () { |
---|
756 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_content_location.xml'); |
---|
757 | try { |
---|
758 | $feed = new XML_Feed_Parser($content); |
---|
759 | } catch (XML_Feed_Parser_Exception $e) { |
---|
760 | $this->assertTrue(false); |
---|
761 | return; |
---|
762 | } |
---|
763 | $this->assertEquals('http://example.com/relative/link', $feed->contributors(0, 'url')); |
---|
764 | } |
---|
765 | |
---|
766 | function test_http_feed_contributor_url_base_docuri_1 () { |
---|
767 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_docuri.xml'); |
---|
768 | try { |
---|
769 | $feed = new XML_Feed_Parser($content); |
---|
770 | } catch (XML_Feed_Parser_Exception $e) { |
---|
771 | $this->assertTrue(false); |
---|
772 | return; |
---|
773 | } |
---|
774 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->contributors(0, 'url')); |
---|
775 | } |
---|
776 | |
---|
777 | function test_http_feed_copyright_base64_base_content_location_1 () { |
---|
778 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base64_base_content_location.xml'); |
---|
779 | try { |
---|
780 | $feed = new XML_Feed_Parser($content); |
---|
781 | } catch (XML_Feed_Parser_Exception $e) { |
---|
782 | $this->assertTrue(false); |
---|
783 | return; |
---|
784 | } |
---|
785 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright); |
---|
786 | } |
---|
787 | |
---|
788 | function test_http_feed_copyright_base64_base_docuri_1 () { |
---|
789 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base64_base_docuri.xml'); |
---|
790 | try { |
---|
791 | $feed = new XML_Feed_Parser($content); |
---|
792 | } catch (XML_Feed_Parser_Exception $e) { |
---|
793 | $this->assertTrue(false); |
---|
794 | return; |
---|
795 | } |
---|
796 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright); |
---|
797 | } |
---|
798 | |
---|
799 | function test_http_feed_copyright_base_content_location_1 () { |
---|
800 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base_content_location.xml'); |
---|
801 | try { |
---|
802 | $feed = new XML_Feed_Parser($content); |
---|
803 | } catch (XML_Feed_Parser_Exception $e) { |
---|
804 | $this->assertTrue(false); |
---|
805 | return; |
---|
806 | } |
---|
807 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright); |
---|
808 | } |
---|
809 | |
---|
810 | function test_http_feed_copyright_base_docuri_1 () { |
---|
811 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_base_docuri.xml'); |
---|
812 | try { |
---|
813 | $feed = new XML_Feed_Parser($content); |
---|
814 | } catch (XML_Feed_Parser_Exception $e) { |
---|
815 | $this->assertTrue(false); |
---|
816 | return; |
---|
817 | } |
---|
818 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright); |
---|
819 | } |
---|
820 | |
---|
821 | function test_http_feed_copyright_inline_base_content_location_1 () { |
---|
822 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_inline_base_content_location.xml'); |
---|
823 | try { |
---|
824 | $feed = new XML_Feed_Parser($content); |
---|
825 | } catch (XML_Feed_Parser_Exception $e) { |
---|
826 | $this->assertTrue(false); |
---|
827 | return; |
---|
828 | } |
---|
829 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->copyright); |
---|
830 | } |
---|
831 | |
---|
832 | function test_http_feed_copyright_inline_base_docuri_1 () { |
---|
833 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_copyright_inline_base_docuri.xml'); |
---|
834 | try { |
---|
835 | $feed = new XML_Feed_Parser($content); |
---|
836 | } catch (XML_Feed_Parser_Exception $e) { |
---|
837 | $this->assertTrue(false); |
---|
838 | return; |
---|
839 | } |
---|
840 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->copyright); |
---|
841 | } |
---|
842 | |
---|
843 | function test_http_feed_generator_url_base_content_location_1 () { |
---|
844 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_generator_url_base_content_location.xml'); |
---|
845 | try { |
---|
846 | $feed = new XML_Feed_Parser($content); |
---|
847 | } catch (XML_Feed_Parser_Exception $e) { |
---|
848 | $this->assertTrue(false); |
---|
849 | return; |
---|
850 | } |
---|
851 | $this->assertEquals('http://example.com/relative/link', $feed->generator(0, 'url')); |
---|
852 | } |
---|
853 | |
---|
854 | function test_http_feed_generator_url_base_docuri_1 () { |
---|
855 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_generator_url_base_docuri.xml'); |
---|
856 | try { |
---|
857 | $feed = new XML_Feed_Parser($content); |
---|
858 | } catch (XML_Feed_Parser_Exception $e) { |
---|
859 | $this->assertTrue(false); |
---|
860 | return; |
---|
861 | } |
---|
862 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->generator(0, 'url')); |
---|
863 | } |
---|
864 | |
---|
865 | function test_http_feed_id_base_content_location_1 () { |
---|
866 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_id_base_content_location.xml'); |
---|
867 | try { |
---|
868 | $feed = new XML_Feed_Parser($content); |
---|
869 | } catch (XML_Feed_Parser_Exception $e) { |
---|
870 | $this->assertTrue(false); |
---|
871 | return; |
---|
872 | } |
---|
873 | $this->assertEquals('http://example.com/relative/link', $feed->id); |
---|
874 | } |
---|
875 | |
---|
876 | function test_http_feed_id_base_docuri_1 () { |
---|
877 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_id_base_docuri.xml'); |
---|
878 | try { |
---|
879 | $feed = new XML_Feed_Parser($content); |
---|
880 | } catch (XML_Feed_Parser_Exception $e) { |
---|
881 | $this->assertTrue(false); |
---|
882 | return; |
---|
883 | } |
---|
884 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->id); |
---|
885 | } |
---|
886 | |
---|
887 | function test_http_feed_info_base64_base_content_location_1 () { |
---|
888 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base64_base_content_location.xml'); |
---|
889 | try { |
---|
890 | $feed = new XML_Feed_Parser($content); |
---|
891 | } catch (XML_Feed_Parser_Exception $e) { |
---|
892 | $this->assertTrue(false); |
---|
893 | return; |
---|
894 | } |
---|
895 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info); |
---|
896 | } |
---|
897 | |
---|
898 | function test_http_feed_info_base64_base_docuri_1 () { |
---|
899 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base64_base_docuri.xml'); |
---|
900 | try { |
---|
901 | $feed = new XML_Feed_Parser($content); |
---|
902 | } catch (XML_Feed_Parser_Exception $e) { |
---|
903 | $this->assertTrue(false); |
---|
904 | return; |
---|
905 | } |
---|
906 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info); |
---|
907 | } |
---|
908 | |
---|
909 | function test_http_feed_info_base_content_location_1 () { |
---|
910 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base_content_location.xml'); |
---|
911 | try { |
---|
912 | $feed = new XML_Feed_Parser($content); |
---|
913 | } catch (XML_Feed_Parser_Exception $e) { |
---|
914 | $this->assertTrue(false); |
---|
915 | return; |
---|
916 | } |
---|
917 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info); |
---|
918 | } |
---|
919 | |
---|
920 | function test_http_feed_info_base_docuri_1 () { |
---|
921 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_base_docuri.xml'); |
---|
922 | try { |
---|
923 | $feed = new XML_Feed_Parser($content); |
---|
924 | } catch (XML_Feed_Parser_Exception $e) { |
---|
925 | $this->assertTrue(false); |
---|
926 | return; |
---|
927 | } |
---|
928 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info); |
---|
929 | } |
---|
930 | |
---|
931 | function test_http_feed_info_inline_base_content_location_1 () { |
---|
932 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_inline_base_content_location.xml'); |
---|
933 | try { |
---|
934 | $feed = new XML_Feed_Parser($content); |
---|
935 | } catch (XML_Feed_Parser_Exception $e) { |
---|
936 | $this->assertTrue(false); |
---|
937 | return; |
---|
938 | } |
---|
939 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->info); |
---|
940 | } |
---|
941 | |
---|
942 | function test_http_feed_info_inline_base_docuri_1 () { |
---|
943 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_info_inline_base_docuri.xml'); |
---|
944 | try { |
---|
945 | $feed = new XML_Feed_Parser($content); |
---|
946 | } catch (XML_Feed_Parser_Exception $e) { |
---|
947 | $this->assertTrue(false); |
---|
948 | return; |
---|
949 | } |
---|
950 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->info); |
---|
951 | } |
---|
952 | |
---|
953 | function test_http_feed_link_base_content_location_1 () { |
---|
954 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_base_content_location.xml'); |
---|
955 | try { |
---|
956 | $feed = new XML_Feed_Parser($content); |
---|
957 | } catch (XML_Feed_Parser_Exception $e) { |
---|
958 | $this->assertTrue(false); |
---|
959 | return; |
---|
960 | } |
---|
961 | $this->assertEquals('http://example.com/relative/link', $feed->links(0, 'href')); |
---|
962 | } |
---|
963 | |
---|
964 | function test_http_feed_link_base_docuri_1 () { |
---|
965 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_base_docuri.xml'); |
---|
966 | try { |
---|
967 | $feed = new XML_Feed_Parser($content); |
---|
968 | } catch (XML_Feed_Parser_Exception $e) { |
---|
969 | $this->assertTrue(false); |
---|
970 | return; |
---|
971 | } |
---|
972 | $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->links(0, 'href')); |
---|
973 | } |
---|
974 | |
---|
975 | function test_http_feed_tagline_base64_base_content_location_1 () { |
---|
976 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base64_base_content_location.xml'); |
---|
977 | try { |
---|
978 | $feed = new XML_Feed_Parser($content); |
---|
979 | } catch (XML_Feed_Parser_Exception $e) { |
---|
980 | $this->assertTrue(false); |
---|
981 | return; |
---|
982 | } |
---|
983 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline); |
---|
984 | } |
---|
985 | |
---|
986 | function test_http_feed_tagline_base64_base_docuri_1 () { |
---|
987 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base64_base_docuri.xml'); |
---|
988 | try { |
---|
989 | $feed = new XML_Feed_Parser($content); |
---|
990 | } catch (XML_Feed_Parser_Exception $e) { |
---|
991 | $this->assertTrue(false); |
---|
992 | return; |
---|
993 | } |
---|
994 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline); |
---|
995 | } |
---|
996 | |
---|
997 | function test_http_feed_tagline_base_content_location_1 () { |
---|
998 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base_content_location.xml'); |
---|
999 | try { |
---|
1000 | $feed = new XML_Feed_Parser($content); |
---|
1001 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1002 | $this->assertTrue(false); |
---|
1003 | return; |
---|
1004 | } |
---|
1005 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline); |
---|
1006 | } |
---|
1007 | |
---|
1008 | function test_http_feed_tagline_base_docuri_1 () { |
---|
1009 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_base_docuri.xml'); |
---|
1010 | try { |
---|
1011 | $feed = new XML_Feed_Parser($content); |
---|
1012 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1013 | $this->assertTrue(false); |
---|
1014 | return; |
---|
1015 | } |
---|
1016 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline); |
---|
1017 | } |
---|
1018 | |
---|
1019 | function test_http_feed_tagline_inline_base_content_location_1 () { |
---|
1020 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_inline_base_content_location.xml'); |
---|
1021 | try { |
---|
1022 | $feed = new XML_Feed_Parser($content); |
---|
1023 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1024 | $this->assertTrue(false); |
---|
1025 | return; |
---|
1026 | } |
---|
1027 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->tagline); |
---|
1028 | } |
---|
1029 | |
---|
1030 | function test_http_feed_tagline_inline_base_docuri_1 () { |
---|
1031 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_tagline_inline_base_docuri.xml'); |
---|
1032 | try { |
---|
1033 | $feed = new XML_Feed_Parser($content); |
---|
1034 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1035 | $this->assertTrue(false); |
---|
1036 | return; |
---|
1037 | } |
---|
1038 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->tagline); |
---|
1039 | } |
---|
1040 | |
---|
1041 | function test_http_feed_title_base64_base_content_location_1 () { |
---|
1042 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base64_base_content_location.xml'); |
---|
1043 | try { |
---|
1044 | $feed = new XML_Feed_Parser($content); |
---|
1045 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1046 | $this->assertTrue(false); |
---|
1047 | return; |
---|
1048 | } |
---|
1049 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title); |
---|
1050 | } |
---|
1051 | |
---|
1052 | function test_http_feed_title_base64_base_docuri_1 () { |
---|
1053 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base64_base_docuri.xml'); |
---|
1054 | try { |
---|
1055 | $feed = new XML_Feed_Parser($content); |
---|
1056 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1057 | $this->assertTrue(false); |
---|
1058 | return; |
---|
1059 | } |
---|
1060 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title); |
---|
1061 | } |
---|
1062 | |
---|
1063 | function test_http_feed_title_base_content_location_1 () { |
---|
1064 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base_content_location.xml'); |
---|
1065 | try { |
---|
1066 | $feed = new XML_Feed_Parser($content); |
---|
1067 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1068 | $this->assertTrue(false); |
---|
1069 | return; |
---|
1070 | } |
---|
1071 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title); |
---|
1072 | } |
---|
1073 | |
---|
1074 | function test_http_feed_title_base_docuri_1 () { |
---|
1075 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_base_docuri.xml'); |
---|
1076 | try { |
---|
1077 | $feed = new XML_Feed_Parser($content); |
---|
1078 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1079 | $this->assertTrue(false); |
---|
1080 | return; |
---|
1081 | } |
---|
1082 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title); |
---|
1083 | } |
---|
1084 | |
---|
1085 | function test_http_feed_title_inline_base_content_location_1 () { |
---|
1086 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_inline_base_content_location.xml'); |
---|
1087 | try { |
---|
1088 | $feed = new XML_Feed_Parser($content); |
---|
1089 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1090 | $this->assertTrue(false); |
---|
1091 | return; |
---|
1092 | } |
---|
1093 | $this->assertEquals('<div><a href="http://example.com/relative/uri">click here</a></div>', $feed->title); |
---|
1094 | } |
---|
1095 | |
---|
1096 | function test_http_feed_title_inline_base_docuri_1 () { |
---|
1097 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_title_inline_base_docuri.xml'); |
---|
1098 | try { |
---|
1099 | $feed = new XML_Feed_Parser($content); |
---|
1100 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1101 | $this->assertTrue(false); |
---|
1102 | return; |
---|
1103 | } |
---|
1104 | $this->assertEquals('<div><a href="http://127.0.0.1:8097/relative/uri">click here</a></div>', $feed->title); |
---|
1105 | } |
---|
1106 | |
---|
1107 | function test_http_item_body_base_content_location_1 () { |
---|
1108 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_body_base_content_location.xml'); |
---|
1109 | try { |
---|
1110 | $feed = new XML_Feed_Parser($content); |
---|
1111 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1112 | $this->assertTrue(false); |
---|
1113 | return; |
---|
1114 | } |
---|
1115 | $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1116 | } |
---|
1117 | |
---|
1118 | function test_http_item_body_base_docuri_1 () { |
---|
1119 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_body_base_docuri.xml'); |
---|
1120 | try { |
---|
1121 | $feed = new XML_Feed_Parser($content); |
---|
1122 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1123 | $this->assertTrue(false); |
---|
1124 | return; |
---|
1125 | } |
---|
1126 | $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1127 | } |
---|
1128 | |
---|
1129 | function test_http_item_comments_base_content_location_1 () { |
---|
1130 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_comments_base_content_location.xml'); |
---|
1131 | try { |
---|
1132 | $feed = new XML_Feed_Parser($content); |
---|
1133 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1134 | $this->assertTrue(false); |
---|
1135 | return; |
---|
1136 | } |
---|
1137 | $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->comments); |
---|
1138 | } |
---|
1139 | |
---|
1140 | function test_http_item_comments_base_docuri_1 () { |
---|
1141 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_comments_base_docuri.xml'); |
---|
1142 | try { |
---|
1143 | $feed = new XML_Feed_Parser($content); |
---|
1144 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1145 | $this->assertTrue(false); |
---|
1146 | return; |
---|
1147 | } |
---|
1148 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->comments); |
---|
1149 | } |
---|
1150 | |
---|
1151 | function test_http_item_content_encoded_base_content_location_1 () { |
---|
1152 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_content_encoded_base_content_location.xml'); |
---|
1153 | try { |
---|
1154 | $feed = new XML_Feed_Parser($content); |
---|
1155 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1156 | $this->assertTrue(false); |
---|
1157 | return; |
---|
1158 | } |
---|
1159 | $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1160 | } |
---|
1161 | |
---|
1162 | function test_http_item_content_encoded_base_docuri_1 () { |
---|
1163 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_content_encoded_base_docuri.xml'); |
---|
1164 | try { |
---|
1165 | $feed = new XML_Feed_Parser($content); |
---|
1166 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1167 | $this->assertTrue(false); |
---|
1168 | return; |
---|
1169 | } |
---|
1170 | $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1171 | } |
---|
1172 | |
---|
1173 | function test_http_item_description_base_content_location_1 () { |
---|
1174 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_description_base_content_location.xml'); |
---|
1175 | try { |
---|
1176 | $feed = new XML_Feed_Parser($content); |
---|
1177 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1178 | $this->assertTrue(false); |
---|
1179 | return; |
---|
1180 | } |
---|
1181 | $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->description); |
---|
1182 | } |
---|
1183 | |
---|
1184 | function test_http_item_description_base_docuri_1 () { |
---|
1185 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_description_base_docuri.xml'); |
---|
1186 | try { |
---|
1187 | $feed = new XML_Feed_Parser($content); |
---|
1188 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1189 | $this->assertTrue(false); |
---|
1190 | return; |
---|
1191 | } |
---|
1192 | $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->description); |
---|
1193 | } |
---|
1194 | |
---|
1195 | function test_http_item_fullitem_base_content_location_1 () { |
---|
1196 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_fullitem_base_content_location.xml'); |
---|
1197 | try { |
---|
1198 | $feed = new XML_Feed_Parser($content); |
---|
1199 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1200 | $this->assertTrue(false); |
---|
1201 | return; |
---|
1202 | } |
---|
1203 | $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1204 | } |
---|
1205 | |
---|
1206 | function test_http_item_fullitem_base_docuri_1 () { |
---|
1207 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_fullitem_base_docuri.xml'); |
---|
1208 | try { |
---|
1209 | $feed = new XML_Feed_Parser($content); |
---|
1210 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1211 | $this->assertTrue(false); |
---|
1212 | return; |
---|
1213 | } |
---|
1214 | $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1215 | } |
---|
1216 | |
---|
1217 | function test_http_item_link_base_content_location_1 () { |
---|
1218 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_link_base_content_location.xml'); |
---|
1219 | try { |
---|
1220 | $feed = new XML_Feed_Parser($content); |
---|
1221 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1222 | $this->assertTrue(false); |
---|
1223 | return; |
---|
1224 | } |
---|
1225 | $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->link); |
---|
1226 | } |
---|
1227 | |
---|
1228 | function test_http_item_link_base_docuri_1 () { |
---|
1229 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_link_base_docuri.xml'); |
---|
1230 | try { |
---|
1231 | $feed = new XML_Feed_Parser($content); |
---|
1232 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1233 | $this->assertTrue(false); |
---|
1234 | return; |
---|
1235 | } |
---|
1236 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->link); |
---|
1237 | } |
---|
1238 | |
---|
1239 | function test_http_item_wfw_comment_base_content_location_1 () { |
---|
1240 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_comment_base_content_location.xml'); |
---|
1241 | try { |
---|
1242 | $feed = new XML_Feed_Parser($content); |
---|
1243 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1244 | $this->assertTrue(false); |
---|
1245 | return; |
---|
1246 | } |
---|
1247 | $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->wfw_comment); |
---|
1248 | } |
---|
1249 | |
---|
1250 | function test_http_item_wfw_comment_base_docuri_1 () { |
---|
1251 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_comment_base_docuri.xml'); |
---|
1252 | try { |
---|
1253 | $feed = new XML_Feed_Parser($content); |
---|
1254 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1255 | $this->assertTrue(false); |
---|
1256 | return; |
---|
1257 | } |
---|
1258 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->wfw_comment); |
---|
1259 | } |
---|
1260 | |
---|
1261 | function test_http_item_wfw_commentRSS_base_content_location_1 () { |
---|
1262 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_commentRSS_base_content_location.xml'); |
---|
1263 | try { |
---|
1264 | $feed = new XML_Feed_Parser($content); |
---|
1265 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1266 | $this->assertTrue(false); |
---|
1267 | return; |
---|
1268 | } |
---|
1269 | $this->assertEquals('http://example.com/relative/uri', $feed->getEntryByOffset(0)->wfw_commentrss); |
---|
1270 | } |
---|
1271 | |
---|
1272 | function test_http_item_wfw_commentRSS_base_docuri_1 () { |
---|
1273 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_wfw_commentRSS_base_docuri.xml'); |
---|
1274 | try { |
---|
1275 | $feed = new XML_Feed_Parser($content); |
---|
1276 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1277 | $this->assertTrue(false); |
---|
1278 | return; |
---|
1279 | } |
---|
1280 | $this->assertEquals('http://127.0.0.1:8097/relative/uri', $feed->getEntryByOffset(0)->wfw_commentrss); |
---|
1281 | } |
---|
1282 | |
---|
1283 | function test_http_item_xhtml_body_base_content_location_1 () { |
---|
1284 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_xhtml_body_base_content_location.xml'); |
---|
1285 | try { |
---|
1286 | $feed = new XML_Feed_Parser($content); |
---|
1287 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1288 | $this->assertTrue(false); |
---|
1289 | return; |
---|
1290 | } |
---|
1291 | $this->assertEquals('<a href="http://example.com/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1292 | } |
---|
1293 | |
---|
1294 | function test_http_item_xhtml_body_base_docuri_1 () { |
---|
1295 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_item_xhtml_body_base_docuri.xml'); |
---|
1296 | try { |
---|
1297 | $feed = new XML_Feed_Parser($content); |
---|
1298 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1299 | $this->assertTrue(false); |
---|
1300 | return; |
---|
1301 | } |
---|
1302 | $this->assertEquals('<a href="http://127.0.0.1:8097/relative/uri">click here</a>', $feed->getEntryByOffset(0)->content(0, 'value')); |
---|
1303 | } |
---|
1304 | |
---|
1305 | function test_http_relative_xml_base_1 () { |
---|
1306 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_relative_xml_base.xml'); |
---|
1307 | try { |
---|
1308 | $feed = new XML_Feed_Parser($content); |
---|
1309 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1310 | $this->assertTrue(false); |
---|
1311 | return; |
---|
1312 | } |
---|
1313 | $this->assertEquals('http://example.com/feed/entry/title/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
1314 | } |
---|
1315 | |
---|
1316 | function test_http_relative_xml_base_2_1 () { |
---|
1317 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_relative_xml_base_2.xml'); |
---|
1318 | try { |
---|
1319 | $feed = new XML_Feed_Parser($content); |
---|
1320 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1321 | $this->assertTrue(false); |
---|
1322 | return; |
---|
1323 | } |
---|
1324 | $this->assertEquals('http://example.com/entry/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
1325 | } |
---|
1326 | |
---|
1327 | function test_malformed_base_1 () { |
---|
1328 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/malformed_base.xml'); |
---|
1329 | try { |
---|
1330 | $feed = new XML_Feed_Parser($content); |
---|
1331 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1332 | $this->assertTrue(false); |
---|
1333 | return; |
---|
1334 | } |
---|
1335 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
1336 | } |
---|
1337 | |
---|
1338 | function test_relative_xml_base_1 () { |
---|
1339 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/relative_xml_base.xml'); |
---|
1340 | try { |
---|
1341 | $feed = new XML_Feed_Parser($content); |
---|
1342 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1343 | $this->assertTrue(false); |
---|
1344 | return; |
---|
1345 | } |
---|
1346 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
1347 | } |
---|
1348 | |
---|
1349 | function test_relative_xml_base_2_1 () { |
---|
1350 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/relative_xml_base_2.xml'); |
---|
1351 | try { |
---|
1352 | $feed = new XML_Feed_Parser($content); |
---|
1353 | } catch (XML_Feed_Parser_Exception $e) { |
---|
1354 | $this->assertTrue(false); |
---|
1355 | return; |
---|
1356 | } |
---|
1357 | $this->assertEquals('http://example.com/test/', $feed->getEntryByOffset(0)->title(0, 'base')); |
---|
1358 | } |
---|
1359 | } |
---|
1360 | |
---|
1361 | $suite = new PHPUnit_TestSuite('base_TestCase'); |
---|
1362 | $result = PHPUnit::run($suite, '123'); |
---|
1363 | echo $result->toString(); |
---|
1364 | |
---|
1365 | ?> |
---|