function test_feedAuthor()
 {
     foreach ($this->files as $file) {
         $contents = file_get_contents($this->sample_dir . DIRECTORY_SEPARATOR . $file);
         $contents = file_get_contents($this->sample_dir . DIRECTORY_SEPARATOR . $file);
         $feed = new XML_Feed_Parser($contents);
         $entry = $feed->getEntryByOffset(0);
         $this->assertEquals($feed->author, $feed->author());
     }
 }
Ejemplo n.º 2
0
 function test_http_feed_author_url_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_url_base_docuri.xml');
     $feed = new XML_Feed_Parser($content, true, true);
     $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->author(0, 'url'));
 }
Ejemplo n.º 3
0
 function test_feed_author_url_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/feed_author_url.xml');
     $feed = new XML_Feed_Parser($content);
     $this->assertEquals('http://example.com/', $feed->author(0, 'url'));
 }
Ejemplo n.º 4
0
 function test_channel_managingEditor_map_author_detail_name_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/rss/channel_managingEditor_map_author_detail_name.xml');
     $feed = new XML_Feed_Parser($content);
     $this->assertEquals('Example editor', $feed->author(0, 'name'));
 }
Ejemplo n.º 5
0
 function test_http_feed_author_url_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_author_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->author(0, 'url'));
 }