Ejemplo n.º 1
0
 function test_channel_href_map_links_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/cdf/channel_href_map_links.xml');
     try {
         $feed = new XML_Feed_Parser($content);
     } catch (XML_Feed_Parser_Exception $e) {
         $this->assertTrue(false);
         return;
     }
     $this->assertEquals('http://www.example.org/', $feed->links(0, 'href'));
 }
Ejemplo n.º 2
0
 function test_http_feed_link_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_base_docuri.xml');
     $feed = new XML_Feed_Parser($content, true, true);
     $this->assertEquals('http://127.0.0.1:8097/relative/link', $feed->links(0, 'href'));
 }
Ejemplo n.º 3
0
 function test_feed_link_type_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/feed_link_type.xml');
     $feed = new XML_Feed_Parser($content);
     $this->assertEquals('text/html', $feed->links(0, 'type'));
 }
Ejemplo n.º 4
0
 function test_http_feed_link_base_docuri_1()
 {
     $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/http_feed_link_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->links(0, 'href'));
 }