4 use Test::More tests => 13;
8 my $feed = XML::Feed->parse('t/samples/base_atom.xml');
9 my ($entry) = $feed->entries;
10 my $content = $entry->content;
11 is($feed->base, "http://example.org/", "Got feed base");
12 is($entry->base, "http://example.org/archives/", "Got entry base");
13 is($content->base, "http://example.org/archives/000001.html", "Got content base");
15 my $xml = $feed->as_xml;
17 ok($new = XML::Feed->parse(\$xml), "Parsed old feed");
18 my ($new_entry) = $new->entries;
19 my $new_content = $entry->content;
20 is($new->base, "http://example.org/", "Got feed base");
21 is($new_entry->base, "http://example.org/archives/", "Got entry base");
22 is($new_content->base, "http://example.org/archives/000001.html", "Got content base");
25 ok($feed->base("http://foo.com/"), "Set feed base");
26 ok($entry->base("http://foo.com/archives/"), "Set entry base");
27 ok($content->base("http://foo.com/archives/000001.html"), "Set content base");
29 is($feed->base, "http://foo.com/", "Got feed base");
30 is($entry->base, "http://foo.com/archives/", "Got entry base");
31 is($content->base, "http://foo.com/archives/000001.html", "Got content base");