function test_feedTitle() { foreach ($this->files as $file) { $contents = file_get_contents($this->sample_dir . DIRECTORY_SEPARATOR . $file); $feed = new XML_Feed_Parser($contents); $entry = $feed->getEntryByOffset(0); $this->assertEquals($feed->title, $feed->title()); } }
function test_feed_title_xml_base_inherit_4_1() { $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_4.xml'); $feed = new XML_Feed_Parser($content, true, true); $this->assertEquals('http://example.com/parent/', $feed->title(0, 'base')); }
function test_feed_title_content_type_text_1() { $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/feed_title_content_type_text.xml'); $feed = new XML_Feed_Parser($content); $this->assertEquals('text/plain', $feed->title(0, 'type')); }
function test_feed_title_xml_base_inherit_4_1() { $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/base/feed_title_xml_base_inherit_4.xml'); try { $feed = new XML_Feed_Parser($content); } catch (XML_Feed_Parser_Exception $e) { $this->assertTrue(false); return; } $this->assertEquals('http://example.com/parent/', $feed->title(0, 'base')); }
function test_feed_title_xml_lang_inherit_4_1() { $content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/lang/feed_title_xml_lang_inherit_4.xml'); $feed = new XML_Feed_Parser($content, false, true); $this->assertEquals('en', $feed->title(0, 'language')); }