diff options
Diffstat (limited to 'simplepie/test/first_item_permalink')
37 files changed, 826 insertions, 0 deletions
diff --git a/simplepie/test/first_item_permalink/SPtests/atom/0.3/enclosure.php b/simplepie/test/first_item_permalink/SPtests/atom/0.3/enclosure.php new file mode 100644 index 000000000..0c849473f --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/atom/0.3/enclosure.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_03_Enclosure extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed version="0.3" xmlns="http://purl.org/atom/ns#"> + <entry> + <link href="http://example.com/" rel="enclosure"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/atom/0.3/link.php new file mode 100644 index 000000000..d45380ec1 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/atom/0.3/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed version="0.3" xmlns="http://purl.org/atom/ns#"> + <entry> + <link href="http://example.com/"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/atom/1.0/enclosure.php b/simplepie/test/first_item_permalink/SPtests/atom/1.0/enclosure.php new file mode 100644 index 000000000..1c27385c6 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/atom/1.0/enclosure.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_10_Enclosure extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry> + <link href="http://example.com/" rel="enclosure"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/atom/1.0/link.php new file mode 100644 index 000000000..f998b2cd6 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/atom/1.0/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry> + <link href="http://example.com/"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/10.0.php b/simplepie/test/first_item_permalink/SPtests/bugs/10.0.php new file mode 100644 index 000000000..12f56b8c2 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/10.0.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_10_Test_0 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <guid>http://example.com/</guid> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/10.1.php b/simplepie/test/first_item_permalink/SPtests/bugs/10.1.php new file mode 100644 index 000000000..78f115049 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/10.1.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_10_Test_1 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <guid isPermaLink="true">http://example.com/</guid> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/10.2.php b/simplepie/test/first_item_permalink/SPtests/bugs/10.2.php new file mode 100644 index 000000000..1611e3f7c --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/10.2.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_10_Test_2 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <guid isPermaLink="meep">http://example.com/</guid> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = NULL; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/10.3.php b/simplepie/test/first_item_permalink/SPtests/bugs/10.3.php new file mode 100644 index 000000000..ed9dbf407 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/10.3.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_10_Test_3 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <guid isPermaLink="false">http://example.com/</guid> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = NULL; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/156.0.php b/simplepie/test/first_item_permalink/SPtests/bugs/156.0.php new file mode 100644 index 000000000..0f9c5151d --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/156.0.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_156_Test_0 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <enclosure url="http://example.com/" length="1" type="audio/mpeg"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/176.0.php b/simplepie/test/first_item_permalink/SPtests/bugs/176.0.php new file mode 100644 index 000000000..a71dd3249 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/176.0.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_176_Test_0 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry> + <link rel="related" href="http://example.com/related"/> + <link rel="via" href="http://example.com/via"/> + <link rel="alternate" href="http://example.com/alternate"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/176.1.php b/simplepie/test/first_item_permalink/SPtests/bugs/176.1.php new file mode 100644 index 000000000..0c217d283 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/176.1.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_176_Test_1 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry> + <link rel="alternate" href="http://example.com/alternate"/> + <link rel="related" href="http://example.com/related"/> + <link rel="via" href="http://example.com/via"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/176.2.php b/simplepie/test/first_item_permalink/SPtests/bugs/176.2.php new file mode 100644 index 000000000..6464d2a2a --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/176.2.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_176_Test_2 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry> + <link rel="related" href="http://example.com/related"/> + <link rel="alternate" href="http://example.com/alternate"/> + <link rel="via" href="http://example.com/via"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/bugs/640.0.php b/simplepie/test/first_item_permalink/SPtests/bugs/640.0.php new file mode 100644 index 000000000..a897bc82e --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/bugs/640.0.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Bug_640_Test_0 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://example.com/" > + <entry> + <link href=""/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/0.3/link.php new file mode 100644 index 000000000..fa52293bf --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/0.3/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_090_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/" xmlns:a="http://purl.org/atom/ns#"> + <item> + <a:link href="http://example.com/"/> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/1.0/link.php new file mode 100644 index 000000000..c5df9496b --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.90/atom/1.0/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_090_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/" xmlns:a="http://www.w3.org/2005/Atom"> + <item> + <a:link href="http://example.com/"/> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.90/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.90/link.php new file mode 100644 index 000000000..72f585e4d --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.90/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_090_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> + <item> + <link>http://example.com/</link> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/0.3/link.php new file mode 100644 index 000000000..0b7881ee8 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/0.3/link.php @@ -0,0 +1,24 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Netscape_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd"> +<rss version="0.91" xmlns:a="http://purl.org/atom/ns#"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/1.0/link.php new file mode 100644 index 000000000..11bb1e8a2 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/atom/1.0/link.php @@ -0,0 +1,24 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Netscape_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd"> +<rss version="0.91" xmlns:a="http://www.w3.org/2005/Atom"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/link.php new file mode 100644 index 000000000..5e5d36bca --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-netscape/link.php @@ -0,0 +1,24 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Netscape_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd"> +<rss version="0.91"> + <channel> + <item> + <link>http://example.com/</link> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/0.91-userland.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/0.91-userland.php new file mode 100644 index 000000000..a559dade2 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/0.91-userland.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Userland_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.91"> + <channel> + <item> + <link>http://example.com/</link> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3-enclosure.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3-enclosure.php new file mode 100644 index 000000000..4a95c94d3 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3-enclosure.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Userland_Atom_03_Link_Enclosure extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.91" xmlns:a="http://purl.org/atom/ns#"> + <channel> + <item> + <a:link href="http://example.com/" rel="enclosure"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3.php new file mode 100644 index 000000000..be336dd2e --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom0.3.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Userland_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.91" xmlns:a="http://purl.org/atom/ns#"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0-enclosure.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0-enclosure.php new file mode 100644 index 000000000..21dd730d2 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0-enclosure.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Userland_Atom_10_Link_Enclosure extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.91" xmlns:a="http://www.w3.org/2005/Atom"> + <channel> + <item> + <a:link href="http://example.com/" rel="enclosure"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0.php b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0.php new file mode 100644 index 000000000..61c07f3f1 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.91-userland/atom1.0.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_091_Userland_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.91" xmlns:a="http://www.w3.org/2005/Atom"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/0.3/link.php new file mode 100644 index 000000000..dbf60a01b --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/0.3/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_092_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.92" xmlns:a="http://purl.org/atom/ns#"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/1.0/link.php new file mode 100644 index 000000000..a289f29ac --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.92/atom/1.0/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_092_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.92" xmlns:a="http://www.w3.org/2005/Atom"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/0.92/link.php b/simplepie/test/first_item_permalink/SPtests/rss/0.92/link.php new file mode 100644 index 000000000..b3ca8fd34 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/0.92/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_092_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="0.92"> + <channel> + <item> + <link>http://example.com/</link> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/0.3/link.php new file mode 100644 index 000000000..9149aa8d8 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/0.3/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_10_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:a="http://purl.org/atom/ns#"> + <item> + <a:link href="http://example.com/"/> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/1.0/link.php new file mode 100644 index 000000000..7d64ed73c --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/1.0/atom/1.0/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_10_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:a="http://www.w3.org/2005/Atom"> + <item> + <a:link href="http://example.com/"/> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/1.0/link.php new file mode 100644 index 000000000..2eb4b4fc0 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/1.0/link.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"> + <item> + <link>http://example.com/</link> + </item> +</rdf:RDF>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/0.3/link.php b/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/0.3/link.php new file mode 100644 index 000000000..881212b2a --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/0.3/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_20_Atom_03_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0" xmlns:a="http://purl.org/atom/ns#"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/1.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/1.0/link.php new file mode 100644 index 000000000..224636dff --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/2.0/atom/1.0/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_20_Atom_10_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0" xmlns:a="http://www.w3.org/2005/Atom"> + <channel> + <item> + <a:link href="http://example.com/"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/2.0/enclosure.php b/simplepie/test/first_item_permalink/SPtests/rss/2.0/enclosure.php new file mode 100644 index 000000000..b58d06c05 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/2.0/enclosure.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_20_Enclosure extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <enclosure url="http://example.com/" length="1" type="text/html"/> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/rss/2.0/link.php b/simplepie/test/first_item_permalink/SPtests/rss/2.0/link.php new file mode 100644 index 000000000..54734d94b --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/rss/2.0/link.php @@ -0,0 +1,23 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_RSS_20_Link extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<rss version="2.0"> + <channel> + <item> + <link>http://example.com/</link> + </item> + </channel> +</rss>'; + } + + function expected() + { + $this->expected = 'http://example.com/'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/xmlbase/1.php b/simplepie/test/first_item_permalink/SPtests/xmlbase/1.php new file mode 100644 index 000000000..9e9be33cd --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/xmlbase/1.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_10_xmlbase_1 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://example.com/"> + <entry> + <link rel="alternate" href="/alternate"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/xmlbase/2.php b/simplepie/test/first_item_permalink/SPtests/xmlbase/2.php new file mode 100644 index 000000000..dccbbd79e --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/xmlbase/2.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_10_xmlbase_2 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom"> + <entry xml:base="http://example.com/"> + <link rel="alternate" href="/alternate"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file diff --git a/simplepie/test/first_item_permalink/SPtests/xmlbase/3.php b/simplepie/test/first_item_permalink/SPtests/xmlbase/3.php new file mode 100644 index 000000000..3cb4732c1 --- /dev/null +++ b/simplepie/test/first_item_permalink/SPtests/xmlbase/3.php @@ -0,0 +1,21 @@ +<?php + +class SimplePie_First_Item_Permalink_Test_Atom_10_xmlbase_3 extends SimplePie_First_Item_Permalink_Test +{ + function data() + { + $this->data = +'<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://example.org/"> + <entry> + <link rel="alternate" href="//example.com/alternate"/> + </entry> +</feed>'; + } + + function expected() + { + $this->expected = 'http://example.com/alternate'; + } +} + +?>
\ No newline at end of file |