fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/atom10_namespace.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example Atom', $feed->title);
}
function test_atom10_version_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/atom10_version.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('atom10', $feed->version());
}
function test_entry_author_email_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_email.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('me@example.com', $feed->getEntryByOffset(0)->author(0, 'email'));
}
function test_entry_author_map_author_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_map_author.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example author (me@example.com)', $feed->getEntryByOffset(0)->author);
}
function test_entry_author_map_author_2_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_map_author_2.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example author', $feed->getEntryByOffset(0)->author);
}
function test_entry_author_name_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_name.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example author', $feed->getEntryByOffset(0)->author(0, 'name'));
}
function test_entry_author_uri_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_uri.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->author(0, 'url'));
}
function test_entry_author_url_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_author_url.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('http://example.com/', $feed->getEntryByOffset(0)->author(0, 'url'));
}
function test_entry_category_label_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_category_label.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Atom 1.0 tests', $feed->getEntryByOffset(0)->tags(0, 'label'));
}
function test_entry_category_scheme_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_category_scheme.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('http://feedparser.org/tests/', $feed->getEntryByOffset(0)->tags(0, 'scheme'));
}
function test_entry_category_term_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_category_term.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('atom10', $feed->getEntryByOffset(0)->tags(0, 'term'));
}
function test_entry_content_application_xml_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_application_xml.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('
Example Atom
', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_base64_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_base64.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_base64_2_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_base64_2.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('History of the <blink> tag
', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_escaped_markup_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_escaped_markup.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_inline_markup_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_inline_markup.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example Atom
', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_inline_markup_2_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_inline_markup_2.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('History of the <blink> tag
', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_src_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_src.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('http://example.com/movie.mp4', $feed->getEntryByOffset(0)->content(0, 'src'));
}
function test_entry_content_text_plain_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_text_plain.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('Example Atom', $feed->getEntryByOffset(0)->content(0, 'value'));
}
function test_entry_content_text_plain_brackets_1 () {
$content = file_get_contents($this->fp_test_dir . DIRECTORY_SEPARATOR . 'wellformed/atom10/entry_content_text_plain_brackets.xml');
try {
$feed = new XML_Feed_Parser($content);
} catch (XML_Feed_Parser_Exception $e) {
$this->assertTrue(false);
return;
}
$this->assertEquals('History of the