Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
require_once dirname(dirname(__FILE__)) . '/XML_Feed_Parser_TestCase.php';
4
 
5
class rdf_TestCase extends XML_Feed_Parser_Converted_TestCase {
6
 
7
    function test_rdf_channel_description_1() {
8
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_channel_description.xml');
9
 
10
        $feed = new XML_Feed_Parser($content);
11
 
12
        $this->assertEquals('Example description', $feed->description);
13
    }
14
 
15
    function test_rdf_channel_link_1() {
16
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_channel_link.xml');
17
 
18
        $feed = new XML_Feed_Parser($content);
19
 
20
        $this->assertEquals('http://example.com/', $feed->link);
21
    }
22
 
23
    function test_rdf_channel_title_1() {
24
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_channel_title.xml');
25
 
26
        $feed = new XML_Feed_Parser($content);
27
 
28
        $this->assertEquals('Example feed', $feed->title);
29
    }
30
 
31
    function test_rdf_item_description_1() {
32
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_item_description.xml');
33
 
34
        $feed = new XML_Feed_Parser($content);
35
 
36
        $this->assertEquals('Example description', $feed->getEntryByOffset(0)->description);
37
    }
38
 
39
    function test_rdf_item_link_1() {
40
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_item_link.xml');
41
 
42
        $feed = new XML_Feed_Parser($content);
43
 
44
        $this->assertEquals('http://example.com/1', $feed->getEntryByOffset(0)->link);
45
    }
46
 
47
    function test_rdf_item_rdf_about_1() {
48
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_item_rdf_about.xml');
49
 
50
        $feed = new XML_Feed_Parser($content);
51
 
52
        $this->assertEquals('http://example.org/1', $feed->getEntryByOffset(0)->id);
53
    }
54
 
55
    function test_rdf_item_title_1() {
56
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rdf_item_title.xml');
57
 
58
        $feed = new XML_Feed_Parser($content);
59
 
60
        $this->assertEquals('Example title', $feed->getEntryByOffset(0)->title);
61
    }
62
 
63
    function test_rss090_channel_title_1() {
64
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rss090_channel_title.xml');
65
 
66
        $feed = new XML_Feed_Parser($content);
67
 
68
        $this->assertEquals('Example title', $feed->title);
69
    }
70
 
71
    function test_rss090_item_title_1() {
72
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rss090_item_title.xml');
73
 
74
        $feed = new XML_Feed_Parser($content);
75
 
76
        $this->assertEquals('Item title', $feed->getEntryByOffset(0)->title);
77
    }
78
 
79
    function test_rss_version_10_1() {
80
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rss_version_10.xml');
81
 
82
        $feed = new XML_Feed_Parser($content);
83
 
84
        $this->assertEquals('rss10', $feed->version());
85
    }
86
 
87
    function test_rss_version_10_not_default_ns_1() {
88
        $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rdf/rss_version_10_not_default_ns.xml');
89
 
90
        $feed = new XML_Feed_Parser($content);
91
 
92
        $this->assertEquals('rss10', $feed->version());
93
    }
94
}
95
?>