Ejemplo n.º 1
0
 function test_http_feed_contributor_url_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_docuri.xml');
     $feed = new XML_Feed_Parser($content, true, true);
     $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->contributors(0, 'url'));
 }
Ejemplo n.º 2
0
 function test_channel_dc_contributor_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rss/channel_dc_contributor.xml');
     $feed = new XML_Feed_Parser($content);
     $this->assertEquals('Example contributor', $feed->contributors(0, 'name'));
 }
Ejemplo n.º 3
0
 function test_feed_contributor_url_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/feed_contributor_url.xml');
     $feed = new XML_Feed_Parser($content);
     $this->assertEquals('http://example.com/', $feed->contributors(0, 'url'));
 }
Ejemplo n.º 4
0
 function test_http_feed_contributor_url_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_contributor_url_base_docuri.xml');
     try {
         $feed = new XML_Feed_Parser($content);
     } catch (XML_Feed_Parser_Exception $e) {
         $this->assertTrue(false);
         return;
     }
     $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->contributors(0, 'url'));
 }