aboutsummaryrefslogtreecommitdiffstats
path: root/simplepie/test/feed_title/SPtests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'simplepie/test/feed_title/SPtests/bugs')
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/16.0.php23
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/174.0.php20
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/18.0.php24
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/18.1.php24
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/20.0.php19
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/20.1.php19
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/20.2.php19
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/272.0.php19
-rw-r--r--simplepie/test/feed_title/SPtests/bugs/272.1.php19
9 files changed, 186 insertions, 0 deletions
diff --git a/simplepie/test/feed_title/SPtests/bugs/16.0.php b/simplepie/test/feed_title/SPtests/bugs/16.0.php
new file mode 100644
index 000000000..ab92612ae
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/16.0.php
@@ -0,0 +1,23 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_16_Test_0 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
+"http://my.netscape.com/publish/formats/rss-0.91.dtd">
+<rss version="0.91">
+ <channel>
+ <title>Feed with DOCTYPE</title>
+ </channel>
+</rss>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Feed with DOCTYPE';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/174.0.php b/simplepie/test/feed_title/SPtests/bugs/174.0.php
new file mode 100644
index 000000000..9625463b7
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/174.0.php
@@ -0,0 +1,20 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_174_Test_0 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<?xml version = "1.0" encoding = "UTF-8" ?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>Spaces in prolog</title>
+</feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Spaces in prolog';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/18.0.php b/simplepie/test/feed_title/SPtests/bugs/18.0.php
new file mode 100644
index 000000000..5f63db252
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/18.0.php
@@ -0,0 +1,24 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_18_Test_0 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<rss version="2.0">
+ <channel>
+ <title>Channel title</title>
+ <image>
+ <title>Image title</title>
+ </image>
+ </channel>
+</rss>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Channel title';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/18.1.php b/simplepie/test/feed_title/SPtests/bugs/18.1.php
new file mode 100644
index 000000000..d51c3d3df
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/18.1.php
@@ -0,0 +1,24 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_18_Test_1 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<rss version="2.0">
+ <channel>
+ <image>
+ <title>Image title</title>
+ </image>
+ <title>Channel title</title>
+ </channel>
+</rss>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Channel title';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/20.0.php b/simplepie/test/feed_title/SPtests/bugs/20.0.php
new file mode 100644
index 000000000..4d1c394b5
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/20.0.php
@@ -0,0 +1,19 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_20_Test_0 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<a:feed xmlns:a="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/1999/xhtml">
+ <a:title>Non-default namespace</a:title>
+</a:feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Non-default namespace';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/20.1.php b/simplepie/test/feed_title/SPtests/bugs/20.1.php
new file mode 100644
index 000000000..f46fc622b
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/20.1.php
@@ -0,0 +1,19 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_20_Test_1 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<a:feed xmlns:a="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/1999/xhtml">
+ <a:title type="xhtml"><div>Non-default namespace</div></a:title>
+</a:feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Non-default namespace';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/20.2.php b/simplepie/test/feed_title/SPtests/bugs/20.2.php
new file mode 100644
index 000000000..ed7d75e42
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/20.2.php
@@ -0,0 +1,19 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_20_Test_2 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<feed xmlns="http://www.w3.org/2005/Atom" xmlns:h="http://www.w3.org/1999/xhtml">
+ <title type="xhtml"><h:div>Non-default namespace</h:div></title>
+</feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Non-default namespace';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/272.0.php b/simplepie/test/feed_title/SPtests/bugs/272.0.php
new file mode 100644
index 000000000..5bd731613
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/272.0.php
@@ -0,0 +1,19 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_272_Test_0 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>Ampersand: <![CDATA[&]]></title>
+</feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = 'Ampersand: &amp;';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/simplepie/test/feed_title/SPtests/bugs/272.1.php b/simplepie/test/feed_title/SPtests/bugs/272.1.php
new file mode 100644
index 000000000..5beda2ded
--- /dev/null
+++ b/simplepie/test/feed_title/SPtests/bugs/272.1.php
@@ -0,0 +1,19 @@
+<?php
+
+class SimplePie_Feed_Title_Test_Bug_272_Test_1 extends SimplePie_Feed_Title_Test
+{
+ function data()
+ {
+ $this->data =
+'<feed xmlns="http://www.w3.org/2005/Atom">
+ <title><![CDATA[&]]>: Ampersand</title>
+</feed>';
+ }
+
+ function expected()
+ {
+ $this->expected = '&amp;: Ampersand';
+ }
+}
+
+?> \ No newline at end of file