helly Sun Jan 18 10:14:03 2004 EDT
Removed files:
/php-src/ext/simplexml/tests 003.xml
Modified files:
/php-src/ext/simplexml/tests 002.phpt 003.phpt 007.phpt 008.phpt
010.phpt
Log:
Use external files only in 001.phpt & tests for bugs
Index: php-src/ext/simplexml/tests/002.phpt
diff -u php-src/ext/simplexml/tests/002.phpt:1.5
php-src/ext/simplexml/tests/002.phpt:1.6
--- php-src/ext/simplexml/tests/002.phpt:1.5 Sat Oct 25 17:07:37 2003
+++ php-src/ext/simplexml/tests/002.phpt Sun Jan 18 10:14:03 2004
@@ -5,7 +5,24 @@
--FILE--
<?php
-$sxe = simplexml_load_file(dirname(__FILE__).'/sxe.xml');
+$xml =<<<EOF
+<?xml version='1.0'?>
+<!DOCTYPE sxe SYSTEM "notfound.dtd">
+<sxe id="elem1">
+ <elem1 attr1='first'>
+ <!-- comment -->
+ <elem2>
+ <elem3>
+ <elem4>
+ <?test processing instruction ?>
+ </elem4>
+ </elem3>
+ </elem2>
+ </elem1>
+</sxe>
+EOF;
+
+$sxe = simplexml_load_string($xml);
$copy = $sxe->__clone();
Index: php-src/ext/simplexml/tests/003.phpt
diff -u php-src/ext/simplexml/tests/003.phpt:1.1
php-src/ext/simplexml/tests/003.phpt:1.2
--- php-src/ext/simplexml/tests/003.phpt:1.1 Sat Oct 25 17:07:37 2003
+++ php-src/ext/simplexml/tests/003.phpt Sun Jan 18 10:14:03 2004
@@ -5,7 +5,28 @@
--FILE--
<?php
-$sxe = simplexml_load_file(dirname(__FILE__).'/003.xml');
+$xml =<<<EOF
+<?xml version='1.0'?>
+<!DOCTYPE sxe SYSTEM "notfound.dtd" [
+<!ENTITY included-entity "This is text included from an entity">
+]>
+<sxe id="elem1">
+ Plain text.
+ <elem1 attr1='first'>
+ <!-- comment -->
+ <elem2>
+ <elem3>
+ &included-entity;
+ <elem4>
+ <?test processing instruction ?>
+ </elem4>
+ </elem3>
+ </elem2>
+ </elem1>
+</sxe>
+EOF;
+
+$sxe = simplexml_load_string($xml);
print_r($sxe);
Index: php-src/ext/simplexml/tests/007.phpt
diff -u php-src/ext/simplexml/tests/007.phpt:1.5
php-src/ext/simplexml/tests/007.phpt:1.6
--- php-src/ext/simplexml/tests/007.phpt:1.5 Sat Jan 17 14:41:32 2004
+++ php-src/ext/simplexml/tests/007.phpt Sun Jan 18 10:14:03 2004
@@ -5,7 +5,24 @@
--FILE--
<?php
-$sxe = simplexml_load_file(dirname(__FILE__).'/sxe.xml');
+$xml =<<<EOF
+<?xml version='1.0'?>
+<!DOCTYPE sxe SYSTEM "notfound.dtd">
+<sxe id="elem1">
+ <elem1 attr1='first'>
+ <!-- comment -->
+ <elem2>
+ <elem3>
+ <elem4>
+ <?test processing instruction ?>
+ </elem4>
+ </elem3>
+ </elem2>
+ </elem1>
+</sxe>
+EOF;
+
+$sxe = simplexml_load_string($xml);
echo "===Property===\n";
var_dump($sxe->elem1);
Index: php-src/ext/simplexml/tests/008.phpt
diff -u php-src/ext/simplexml/tests/008.phpt:1.2
php-src/ext/simplexml/tests/008.phpt:1.3
--- php-src/ext/simplexml/tests/008.phpt:1.2 Sat Jan 17 14:41:32 2004
+++ php-src/ext/simplexml/tests/008.phpt Sun Jan 18 10:14:03 2004
@@ -4,7 +4,26 @@
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
-$sxe = simplexml_load_file(dirname(__FILE__).'/sxe.xml');
+
+$xml =<<<EOF
+<?xml version='1.0'?>
+<!DOCTYPE sxe SYSTEM "notfound.dtd">
+<sxe id="elem1">
+ <elem1 attr1='first'>
+ <!-- comment -->
+ <elem2>
+ <elem3>
+ <elem4>
+ <?test processing instruction ?>
+ </elem4>
+ </elem3>
+ </elem2>
+ </elem1>
+</sxe>
+EOF;
+
+$sxe = simplexml_load_string($xml);
+
var_dump($sxe->xpath("elem1/elem2/elem3/elem4"));
var_dump($sxe->xpath("***"));
?>
Index: php-src/ext/simplexml/tests/010.phpt
diff -u php-src/ext/simplexml/tests/010.phpt:1.3
php-src/ext/simplexml/tests/010.phpt:1.4
--- php-src/ext/simplexml/tests/010.phpt:1.3 Sat Jan 17 10:57:06 2004
+++ php-src/ext/simplexml/tests/010.phpt Sun Jan 18 10:14:03 2004
@@ -9,13 +9,29 @@
{
}
-$sxe = simplexml_load_file(dirname(__FILE__).'/sxe.xml', 'simplexml_inherited');
+$xml =<<<EOF
+<?xml version='1.0'?>
+<!DOCTYPE sxe SYSTEM "notfound.dtd">
+<sxe id="elem1">
+ <elem1 attr1='first'>
+ <!-- comment -->
+ <elem2>
+ <elem3>
+ <elem4>
+ <?test processing instruction ?>
+ </elem4>
+ </elem3>
+ </elem2>
+ </elem1>
+</sxe>
+EOF;
-print_r($sxe);
+$sxe = simplexml_load_string($xml, 'simplexml_inherited');
-echo "---Done---\n";
+print_r($sxe);
?>
+===DONE===
--EXPECT--
simplexml_inherited Object
(
@@ -44,4 +60,4 @@
)
)
----Done---
+===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php