1 | <?php |
---|
2 | |
---|
3 | require_once 'XML_Feed_Parser_TestCase.php'; |
---|
4 | |
---|
5 | class date_TestCase extends XML_Feed_Parser_Converted_TestCase { |
---|
6 | |
---|
7 | function test_cdf_channel_lastmod_map_date_1 () { |
---|
8 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_channel_lastmod_map_date.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('2004-04-06T23:05:43-05:00', $feed->date); |
---|
16 | } |
---|
17 | |
---|
18 | function test_cdf_channel_lastmod_map_modified_1 () { |
---|
19 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_channel_lastmod_map_modified.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('2004-04-06T23:05:43-05:00', $feed->modified); |
---|
27 | } |
---|
28 | |
---|
29 | function test_cdf_channel_lastmod_map_modified_parsed_1 () { |
---|
30 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_channel_lastmod_map_modified_parsed.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(array(2004, 4, 7, 4, 5, 43, 2, 98, 0), $feed->modified_parsed); |
---|
38 | } |
---|
39 | |
---|
40 | function test_cdf_item_lastmod_map_date_1 () { |
---|
41 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_item_lastmod_map_date.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('2004-04-06T23:05:43-05:00', $feed->getEntryByOffset(0)->date); |
---|
49 | } |
---|
50 | |
---|
51 | function test_cdf_item_lastmod_map_modified_1 () { |
---|
52 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_item_lastmod_map_modified.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('2004-04-06T23:05:43-05:00', $feed->getEntryByOffset(0)->modified); |
---|
60 | } |
---|
61 | |
---|
62 | function test_cdf_item_lastmod_map_modified_parsed_1 () { |
---|
63 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/cdf_item_lastmod_map_modified_parsed.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(array(2004, 4, 7, 4, 5, 43, 2, 98, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
71 | } |
---|
72 | |
---|
73 | function test_channel_dc_date_1 () { |
---|
74 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dc_date.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('2003-12-31T10:14:55Z', $feed->date); |
---|
82 | } |
---|
83 | |
---|
84 | function test_channel_dc_date_map_modified_1 () { |
---|
85 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dc_date_map_modified.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('2003-12-31T10:14:55Z', $feed->modified); |
---|
93 | } |
---|
94 | |
---|
95 | function test_channel_dc_date_w3dtf_utc_1 () { |
---|
96 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dc_date_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->date_parsed); |
---|
104 | } |
---|
105 | |
---|
106 | function test_channel_dc_date_w3dtf_utc_map_modified_parsed_1 () { |
---|
107 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dc_date_w3dtf_utc_map_modified_parsed.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->modified_parsed); |
---|
115 | } |
---|
116 | |
---|
117 | function test_channel_dcterms_created_1 () { |
---|
118 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_created.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('2003-12-31T10:14:55Z', $feed->created); |
---|
126 | } |
---|
127 | |
---|
128 | function test_channel_dcterms_created_w3dtf_utc_1 () { |
---|
129 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_created_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->created_parsed); |
---|
137 | } |
---|
138 | |
---|
139 | function test_channel_dcterms_issued_1 () { |
---|
140 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_issued.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('2003-12-31T10:14:55Z', $feed->issued); |
---|
148 | } |
---|
149 | |
---|
150 | function test_channel_dcterms_issued_w3dtf_utc_1 () { |
---|
151 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_issued_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->issued_parsed); |
---|
159 | } |
---|
160 | |
---|
161 | function test_channel_dcterms_modified_1 () { |
---|
162 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_modified.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('2003-12-31T10:14:55Z', $feed->modified); |
---|
170 | } |
---|
171 | |
---|
172 | function test_channel_dcterms_modified_map_date_1 () { |
---|
173 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_modified_map_date.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('2003-12-31T10:14:55Z', $feed->date); |
---|
181 | } |
---|
182 | |
---|
183 | function test_channel_dcterms_modified_w3dtf_utc_1 () { |
---|
184 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_modified_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->modified_parsed); |
---|
192 | } |
---|
193 | |
---|
194 | function test_channel_dcterms_modified_w3dtf_utc_map_date_1 () { |
---|
195 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_dcterms_modified_w3dtf_utc_map_date.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->date_parsed); |
---|
203 | } |
---|
204 | |
---|
205 | function test_channel_pubDate_1 () { |
---|
206 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->date); |
---|
214 | } |
---|
215 | |
---|
216 | function test_channel_pubDate_asctime_1 () { |
---|
217 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_asctime.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(array(2004, 1, 5, 0, 29, 6, 0, 5, 0), $feed->date_parsed); |
---|
225 | } |
---|
226 | |
---|
227 | function test_channel_pubDate_disney_1 () { |
---|
228 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_disney.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(array(2004, 1, 26, 21, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
236 | } |
---|
237 | |
---|
238 | function test_channel_pubDate_disney_at_1 () { |
---|
239 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_disney_at.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(array(2004, 1, 26, 20, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
247 | } |
---|
248 | |
---|
249 | function test_channel_pubDate_disney_ct_1 () { |
---|
250 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_disney_ct.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(array(2004, 1, 26, 22, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
258 | } |
---|
259 | |
---|
260 | function test_channel_pubDate_disney_mt_1 () { |
---|
261 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_disney_mt.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(array(2004, 1, 26, 23, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
269 | } |
---|
270 | |
---|
271 | function test_channel_pubDate_disney_pt_1 () { |
---|
272 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_disney_pt.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(array(2004, 1, 27, 0, 31, 0, 1, 27, 0), $feed->date_parsed); |
---|
280 | } |
---|
281 | |
---|
282 | function test_channel_pubDate_greek_1_1 () { |
---|
283 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_greek_1.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(array(2004, 7, 11, 17, 0, 0, 6, 193, 0), $feed->date_parsed); |
---|
291 | } |
---|
292 | |
---|
293 | function test_channel_pubDate_hungarian_1_1 () { |
---|
294 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_hungarian_1.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(array(2004, 7, 13, 14, 15, 0, 1, 195, 0), $feed->date_parsed); |
---|
302 | } |
---|
303 | |
---|
304 | function test_channel_pubDate_iso8601_ym_1 () { |
---|
305 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_iso8601_ym.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->date_parsed); |
---|
313 | } |
---|
314 | |
---|
315 | function test_channel_pubDate_iso8601_ym_2_1 () { |
---|
316 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_iso8601_ym_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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->date_parsed); |
---|
324 | } |
---|
325 | |
---|
326 | function test_channel_pubDate_iso8601_ymd_1 () { |
---|
327 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_iso8601_ymd.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->date_parsed); |
---|
335 | } |
---|
336 | |
---|
337 | function test_channel_pubDate_iso8601_ymd_2_1 () { |
---|
338 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_iso8601_ymd_2.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->date_parsed); |
---|
346 | } |
---|
347 | |
---|
348 | function test_channel_pubDate_iso8601_yo_2_1 () { |
---|
349 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_iso8601_yo_2.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->date_parsed); |
---|
357 | } |
---|
358 | |
---|
359 | function test_channel_pubDate_korean_nate_1 () { |
---|
360 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_korean_nate.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(array(2004, 5, 25, 14, 23, 17, 1, 146, 0), $feed->date_parsed); |
---|
368 | } |
---|
369 | |
---|
370 | function test_channel_pubDate_map_modified_1 () { |
---|
371 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_map_modified.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->modified_parsed); |
---|
379 | } |
---|
380 | |
---|
381 | function test_channel_pubDate_mssql_1 () { |
---|
382 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_mssql.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(array(2004, 7, 8, 14, 56, 58, 3, 190, 0), $feed->date_parsed); |
---|
390 | } |
---|
391 | |
---|
392 | function test_channel_pubDate_mssql_nofraction_1 () { |
---|
393 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_mssql_nofraction.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(array(2004, 7, 8, 14, 56, 58, 3, 190, 0), $feed->date_parsed); |
---|
401 | } |
---|
402 | |
---|
403 | function test_channel_pubDate_nosecond_1 () { |
---|
404 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_nosecond.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(array(2004, 1, 1, 0, 0, 0, 3, 1, 0), $feed->date_parsed); |
---|
412 | } |
---|
413 | |
---|
414 | function test_channel_pubDate_notime_1 () { |
---|
415 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_notime.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(array(2004, 1, 1, 0, 0, 0, 3, 1, 0), $feed->date_parsed); |
---|
423 | } |
---|
424 | |
---|
425 | function test_channel_pubDate_rfc2822_1 () { |
---|
426 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_rfc2822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->date_parsed); |
---|
434 | } |
---|
435 | |
---|
436 | function test_channel_pubDate_rfc2822_rollover_june_31_1 () { |
---|
437 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_rfc2822_rollover_june_31.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(array(2004, 7, 1, 19, 48, 21, 3, 183, 0), $feed->date_parsed); |
---|
445 | } |
---|
446 | |
---|
447 | function test_channel_pubDate_rfc822_1 () { |
---|
448 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_rfc822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->date_parsed); |
---|
456 | } |
---|
457 | |
---|
458 | function test_channel_pubDate_w3dtf_rollover_25h_1 () { |
---|
459 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_25h.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(array(2004, 1, 1, 1, 14, 55, 3, 1, 0), $feed->date_parsed); |
---|
467 | } |
---|
468 | |
---|
469 | function test_channel_pubDate_w3dtf_rollover_61m_1 () { |
---|
470 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_61m.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(array(2003, 12, 31, 11, 1, 55, 2, 365, 0), $feed->date_parsed); |
---|
478 | } |
---|
479 | |
---|
480 | function test_channel_pubDate_w3dtf_rollover_61s_1 () { |
---|
481 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_61s.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(array(2003, 12, 31, 10, 15, 1, 2, 365, 0), $feed->date_parsed); |
---|
489 | } |
---|
490 | |
---|
491 | function test_channel_pubDate_w3dtf_rollover_leapyear_1 () { |
---|
492 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_leapyear.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(array(2004, 2, 29, 2, 14, 55, 6, 60, 0), $feed->date_parsed); |
---|
500 | } |
---|
501 | |
---|
502 | function test_channel_pubDate_w3dtf_rollover_leapyear400_1 () { |
---|
503 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_leapyear400.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(array(2000, 2, 29, 2, 14, 55, 1, 60, 0), $feed->date_parsed); |
---|
511 | } |
---|
512 | |
---|
513 | function test_channel_pubDate_w3dtf_rollover_nonleapyear_1 () { |
---|
514 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_rollover_nonleapyear.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(array(2003, 3, 1, 2, 14, 55, 5, 60, 0), $feed->date_parsed); |
---|
522 | } |
---|
523 | |
---|
524 | function test_channel_pubDate_w3dtf_sf_1 () { |
---|
525 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_sf.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(array(2003, 12, 31, 18, 14, 55, 2, 365, 0), $feed->date_parsed); |
---|
533 | } |
---|
534 | |
---|
535 | function test_channel_pubDate_w3dtf_tokyo_1 () { |
---|
536 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_tokyo.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->date_parsed); |
---|
544 | } |
---|
545 | |
---|
546 | function test_channel_pubDate_w3dtf_utc_1 () { |
---|
547 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->date_parsed); |
---|
555 | } |
---|
556 | |
---|
557 | function test_channel_pubDate_w3dtf_y_1 () { |
---|
558 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_y.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(array(2003, 1, 1, 0, 0, 0, 2, 1, 0), $feed->date_parsed); |
---|
566 | } |
---|
567 | |
---|
568 | function test_channel_pubDate_w3dtf_ym_1 () { |
---|
569 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_ym.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->date_parsed); |
---|
577 | } |
---|
578 | |
---|
579 | function test_channel_pubDate_w3dtf_ymd_1 () { |
---|
580 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_ymd.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->date_parsed); |
---|
588 | } |
---|
589 | |
---|
590 | function test_channel_pubDate_w3dtf_ymd_2_1 () { |
---|
591 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/channel_pubDate_w3dtf_ymd_2.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->date_parsed); |
---|
599 | } |
---|
600 | |
---|
601 | function test_entry_created_1 () { |
---|
602 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_created.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->getEntryByOffset(0)->created); |
---|
610 | } |
---|
611 | |
---|
612 | function test_entry_created_w3dtf_utc_1 () { |
---|
613 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_created_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->created_parsed); |
---|
621 | } |
---|
622 | |
---|
623 | function test_entry_issued_1 () { |
---|
624 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_issued.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->getEntryByOffset(0)->issued); |
---|
632 | } |
---|
633 | |
---|
634 | function test_entry_issued_w3dtf_utc_1 () { |
---|
635 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_issued_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->issued_parsed); |
---|
643 | } |
---|
644 | |
---|
645 | function test_entry_modified_1 () { |
---|
646 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_modified.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->getEntryByOffset(0)->modified); |
---|
654 | } |
---|
655 | |
---|
656 | function test_entry_modified_map_date_1 () { |
---|
657 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_modified_map_date.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->getEntryByOffset(0)->date_parsed); |
---|
665 | } |
---|
666 | |
---|
667 | function test_entry_modified_w3dtf_utc_1 () { |
---|
668 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_modified_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
676 | } |
---|
677 | |
---|
678 | function test_entry_published_w3dtf_utc_1 () { |
---|
679 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_published_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->published_parsed); |
---|
687 | } |
---|
688 | |
---|
689 | function test_entry_source_updated_w3dtf_utc_1 () { |
---|
690 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_source_updated_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->source(0, 'updated_parsed')); |
---|
698 | } |
---|
699 | |
---|
700 | function test_entry_updated_w3dtf_utc_1 () { |
---|
701 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/entry_updated_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->updated_parsed); |
---|
709 | } |
---|
710 | |
---|
711 | function test_feed_modified_1 () { |
---|
712 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->modified); |
---|
720 | } |
---|
721 | |
---|
722 | function test_feed_modified_asctime_1 () { |
---|
723 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_asctime.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(array(2004, 1, 5, 0, 29, 6, 0, 5, 0), $feed->modified_parsed); |
---|
731 | } |
---|
732 | |
---|
733 | function test_feed_modified_disney_1 () { |
---|
734 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_disney.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(array(2004, 1, 26, 21, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
742 | } |
---|
743 | |
---|
744 | function test_feed_modified_disney_at_1 () { |
---|
745 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_disney_at.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(array(2004, 1, 26, 20, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
753 | } |
---|
754 | |
---|
755 | function test_feed_modified_disney_ct_1 () { |
---|
756 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_disney_ct.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(array(2004, 1, 26, 22, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
764 | } |
---|
765 | |
---|
766 | function test_feed_modified_disney_mt_1 () { |
---|
767 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_disney_mt.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(array(2004, 1, 26, 23, 31, 0, 0, 26, 0), $feed->date_parsed); |
---|
775 | } |
---|
776 | |
---|
777 | function test_feed_modified_disney_pt_1 () { |
---|
778 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_disney_pt.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(array(2004, 1, 27, 0, 31, 0, 1, 27, 0), $feed->date_parsed); |
---|
786 | } |
---|
787 | |
---|
788 | function test_feed_modified_iso8601_ym_1 () { |
---|
789 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_iso8601_ym.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->modified_parsed); |
---|
797 | } |
---|
798 | |
---|
799 | function test_feed_modified_iso8601_ym_2_1 () { |
---|
800 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_iso8601_ym_2.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->modified_parsed); |
---|
808 | } |
---|
809 | |
---|
810 | function test_feed_modified_iso8601_ymd_1 () { |
---|
811 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_iso8601_ymd.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->modified_parsed); |
---|
819 | } |
---|
820 | |
---|
821 | function test_feed_modified_iso8601_ymd_2_1 () { |
---|
822 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_iso8601_ymd_2.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->modified_parsed); |
---|
830 | } |
---|
831 | |
---|
832 | function test_feed_modified_iso8601_yo_2_1 () { |
---|
833 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_iso8601_yo_2.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->modified_parsed); |
---|
841 | } |
---|
842 | |
---|
843 | function test_feed_modified_map_date_1 () { |
---|
844 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_map_date.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->date_parsed); |
---|
852 | } |
---|
853 | |
---|
854 | function test_feed_modified_rfc2822_1 () { |
---|
855 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_rfc2822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->modified_parsed); |
---|
863 | } |
---|
864 | |
---|
865 | function test_feed_modified_rfc2822_rollover_june_31_1 () { |
---|
866 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_rfc2822_rollover_june_31.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(array(2004, 7, 1, 19, 48, 21, 3, 183, 0), $feed->modified_parsed); |
---|
874 | } |
---|
875 | |
---|
876 | function test_feed_modified_rfc822_1 () { |
---|
877 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_rfc822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->modified_parsed); |
---|
885 | } |
---|
886 | |
---|
887 | function test_feed_modified_w3dtf_rollover_leapyear_1 () { |
---|
888 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_rollover_leapyear.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(array(2004, 2, 29, 2, 14, 55, 6, 60, 0), $feed->modified_parsed); |
---|
896 | } |
---|
897 | |
---|
898 | function test_feed_modified_w3dtf_rollover_leapyear400_1 () { |
---|
899 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_rollover_leapyear400.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(array(2000, 2, 29, 2, 14, 55, 1, 60, 0), $feed->modified_parsed); |
---|
907 | } |
---|
908 | |
---|
909 | function test_feed_modified_w3dtf_rollover_nonleapyear_1 () { |
---|
910 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_rollover_nonleapyear.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(array(2003, 3, 1, 2, 14, 55, 5, 60, 0), $feed->modified_parsed); |
---|
918 | } |
---|
919 | |
---|
920 | function test_feed_modified_w3dtf_sf_1 () { |
---|
921 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_sf.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(array(2003, 12, 31, 18, 14, 55, 2, 365, 0), $feed->modified_parsed); |
---|
929 | } |
---|
930 | |
---|
931 | function test_feed_modified_w3dtf_tokyo_1 () { |
---|
932 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_tokyo.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->modified_parsed); |
---|
940 | } |
---|
941 | |
---|
942 | function test_feed_modified_w3dtf_utc_1 () { |
---|
943 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->modified_parsed); |
---|
951 | } |
---|
952 | |
---|
953 | function test_feed_modified_w3dtf_y_1 () { |
---|
954 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_y.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(array(2003, 1, 1, 0, 0, 0, 2, 1, 0), $feed->modified_parsed); |
---|
962 | } |
---|
963 | |
---|
964 | function test_feed_modified_w3dtf_ym_1 () { |
---|
965 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_ym.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(array(2003, 12, 1, 0, 0, 0, 0, 335, 0), $feed->modified_parsed); |
---|
973 | } |
---|
974 | |
---|
975 | function test_feed_modified_w3dtf_ymd_1 () { |
---|
976 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_ymd.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->modified_parsed); |
---|
984 | } |
---|
985 | |
---|
986 | function test_feed_modified_w3dtf_ymd_2_1 () { |
---|
987 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_modified_w3dtf_ymd_2.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(array(2003, 12, 31, 0, 0, 0, 2, 365, 0), $feed->modified_parsed); |
---|
995 | } |
---|
996 | |
---|
997 | function test_feed_updated_w3dtf_utc_1 () { |
---|
998 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/feed_updated_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->updated_parsed); |
---|
1006 | } |
---|
1007 | |
---|
1008 | function test_item_dc_date_1 () { |
---|
1009 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dc_date.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->date); |
---|
1017 | } |
---|
1018 | |
---|
1019 | function test_item_dc_date_map_modified_1 () { |
---|
1020 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dc_date_map_modified.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->modified); |
---|
1028 | } |
---|
1029 | |
---|
1030 | function test_item_dc_date_w3dtf_utc_1 () { |
---|
1031 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dc_date_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->date_parsed); |
---|
1039 | } |
---|
1040 | |
---|
1041 | function test_item_dc_date_w3dtf_utc_map_modified_parsed_1 () { |
---|
1042 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dc_date_w3dtf_utc_map_modified_parsed.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
1050 | } |
---|
1051 | |
---|
1052 | function test_item_dcterms_created_1 () { |
---|
1053 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_created.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->created); |
---|
1061 | } |
---|
1062 | |
---|
1063 | function test_item_dcterms_created_w3dtf_utc_1 () { |
---|
1064 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_created_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->created_parsed); |
---|
1072 | } |
---|
1073 | |
---|
1074 | function test_item_dcterms_issued_1 () { |
---|
1075 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_issued.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->issued); |
---|
1083 | } |
---|
1084 | |
---|
1085 | function test_item_dcterms_issued_w3dtf_utc_1 () { |
---|
1086 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_issued_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->issued_parsed); |
---|
1094 | } |
---|
1095 | |
---|
1096 | function test_item_dcterms_modified_1 () { |
---|
1097 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_modified.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->modified); |
---|
1105 | } |
---|
1106 | |
---|
1107 | function test_item_dcterms_modified_map_date_1 () { |
---|
1108 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_modified_map_date.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('2003-12-31T10:14:55Z', $feed->getEntryByOffset(0)->date); |
---|
1116 | } |
---|
1117 | |
---|
1118 | function test_item_dcterms_modified_w3dtf_utc_1 () { |
---|
1119 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_modified_w3dtf_utc.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
1127 | } |
---|
1128 | |
---|
1129 | function test_item_dcterms_modified_w3dtf_utc_map_date_1 () { |
---|
1130 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_dcterms_modified_w3dtf_utc_map_date.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(array(2003, 12, 31, 10, 14, 55, 2, 365, 0), $feed->getEntryByOffset(0)->date_parsed); |
---|
1138 | } |
---|
1139 | |
---|
1140 | function test_item_expirationDate_1 () { |
---|
1141 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_expirationDate.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->getEntryByOffset(0)->expired); |
---|
1149 | } |
---|
1150 | |
---|
1151 | function test_item_expirationDate_rfc2822_1 () { |
---|
1152 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_expirationDate_rfc2822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->getEntryByOffset(0)->expired_parsed); |
---|
1160 | } |
---|
1161 | |
---|
1162 | function test_item_pubDate_1 () { |
---|
1163 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_pubDate.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('Thu, 01 Jan 2004 19:48:21 GMT', $feed->getEntryByOffset(0)->date); |
---|
1171 | } |
---|
1172 | |
---|
1173 | function test_item_pubDate_euc-kr_1 () { |
---|
1174 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_pubDate_euc-kr.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(array(2004, 5, 27, 16, 31, 15, 3, 148, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
1182 | } |
---|
1183 | |
---|
1184 | function test_item_pubDate_map_modified_1 () { |
---|
1185 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_pubDate_map_modified.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->getEntryByOffset(0)->modified_parsed); |
---|
1193 | } |
---|
1194 | |
---|
1195 | function test_item_pubDate_rfc2822_1 () { |
---|
1196 | $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/date/item_pubDate_rfc2822.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(array(2004, 1, 1, 19, 48, 21, 3, 1, 0), $feed->getEntryByOffset(0)->date_parsed); |
---|
1204 | } |
---|
1205 | } |
---|
1206 | |
---|
1207 | $suite = new PHPUnit_TestSuite('date_TestCase'); |
---|
1208 | $result = PHPUnit::run($suite, '123'); |
---|
1209 | echo $result->toString(); |
---|
1210 | |
---|
1211 | ?> |
---|