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')); }
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')); }
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')); }
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')); }