]> granicus.if.org Git - php/commitdiff
add a test for shane's bug #24392
authorSterling Hughes <sterling@php.net>
Mon, 30 Jun 2003 18:09:11 +0000 (18:09 +0000)
committerSterling Hughes <sterling@php.net>
Mon, 30 Jun 2003 18:09:11 +0000 (18:09 +0000)
ext/simplexml/tests/002.phpt [new file with mode: 0644]
ext/simplexml/tests/002.xml [new file with mode: 0644]

diff --git a/ext/simplexml/tests/002.phpt b/ext/simplexml/tests/002.phpt
new file mode 100644 (file)
index 0000000..4154a91
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+Checking bug #24392, empty namespaces causing confusion
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
+--POST--
+--GET--
+--INI--
+--FILE--
+<?php 
+$s = simplexml_load_file('ext/simplexml/tests/002.xml');
+foreach ($s->item as $item) {
+       echo $item->title . "\n";
+}
+?>
+--EXPECT--
+EU Parliament to Vote on New Patent Rules
+Most Powerful Amateur Rocket in Canada
+GF FX 5900 Ultra vs. ATi Radeon 9800 Pro
+PHP 5 Beta 1
+Engaging with the OSS Community
+Pure Math, Pure Joy
+Windows Tech Writer Looks at Linux
+US Cell Phone Users Discover SMS Spam
+Verizon Sues Nextel For Espionage
+Introduction to Debian
diff --git a/ext/simplexml/tests/002.xml b/ext/simplexml/tests/002.xml
new file mode 100644 (file)
index 0000000..d669f1d
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+
+<rdf:RDF
+xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+xmlns="http://my.netscape.com/rdf/simple/0.9/">
+
+<channel>
+<title>Slashdot</title>
+<link>http://slashdot.org/</link>
+<description>News for nerds, stuff that matters</description>
+</channel>
+
+<image>
+<title>Slashdot</title>
+<url>http://images.slashdot.org/topics/topicslashdot.gif</url>
+<link>http://slashdot.org/</link>
+</image>
+
+<item>
+<title>EU Parliament to Vote on New Patent Rules</title>
+<link>http://slashdot.org/article.pl?sid=03/06/30/002211</link>
+</item>
+
+<item>
+<title>Most Powerful Amateur Rocket in Canada</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/2121211</link>
+</item>
+
+<item>
+<title>GF FX 5900 Ultra vs. ATi Radeon 9800 Pro</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/202218</link>
+</item>
+
+<item>
+<title>PHP 5 Beta 1</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1957253</link>
+</item>
+
+<item>
+<title>Engaging with the OSS Community</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1913235</link>
+</item>
+
+<item>
+<title>Pure Math, Pure Joy</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/183258</link>
+</item>
+
+<item>
+<title>Windows Tech Writer Looks at Linux</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1554201</link>
+</item>
+
+<item>
+<title>US Cell Phone Users Discover SMS Spam</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1542249</link>
+</item>
+
+<item>
+<title>Verizon Sues Nextel For Espionage</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1443230</link>
+</item>
+
+<item>
+<title>Introduction to Debian</title>
+<link>http://slashdot.org/article.pl?sid=03/06/29/1424213</link>
+</item>
+
+<textinput>
+<title>Search Slashdot</title>
+<description>Search Slashdot stories</description>
+<name>query</name>
+<link>http://slashdot.org/search.pl</link>
+</textinput>
+
+</rdf:RDF>
\ No newline at end of file