helly Sat Oct 25 17:07:44 2003 EDT
Added files:
/php-src/ext/simplexml/tests 003.phpt 003.xml 004.phpt 004.xml
Modified files:
/php-src/ext/simplexml/tests 001.phpt 002.phpt sxe.xml
Log:
More testing
Index: php-src/ext/simplexml/tests/001.phpt
diff -u php-src/ext/simplexml/tests/001.phpt:1.2
php-src/ext/simplexml/tests/001.phpt:1.3
--- php-src/ext/simplexml/tests/001.phpt:1.2 Sat Oct 25 16:00:03 2003
+++ php-src/ext/simplexml/tests/001.phpt Sat Oct 25 17:07:36 2003
@@ -1,5 +1,5 @@
--TEST--
-SimpleXML without CDATA
+SimpleXML: Simple document
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
@@ -25,11 +25,6 @@
(
[elem3] => simplexml_element Object
(
- [included-entity] => simplexml_element Object
- (
- [included-entity] => This is text included from
an entity
- )
-
[elem4] => simplexml_element Object
(
[test] => simplexml_element Object
Index: php-src/ext/simplexml/tests/002.phpt
diff -u php-src/ext/simplexml/tests/002.phpt:1.4
php-src/ext/simplexml/tests/002.phpt:1.5
--- php-src/ext/simplexml/tests/002.phpt:1.4 Sat Oct 25 16:27:48 2003
+++ php-src/ext/simplexml/tests/002.phpt Sat Oct 25 17:07:37 2003
@@ -27,11 +27,6 @@
(
[elem3] => simplexml_element Object
(
- [included-entity] => simplexml_element Object
- (
- [included-entity] => This is text included from
an entity
- )
-
[elem4] => simplexml_element Object
(
[test] => simplexml_element Object
Index: php-src/ext/simplexml/tests/sxe.xml
diff -u php-src/ext/simplexml/tests/sxe.xml:1.1 php-src/ext/simplexml/tests/sxe.xml:1.2
--- php-src/ext/simplexml/tests/sxe.xml:1.1 Sat Oct 25 16:00:04 2003
+++ php-src/ext/simplexml/tests/sxe.xml Sat Oct 25 17:07:37 2003
@@ -4,12 +4,10 @@
%incent;
]>
<sxe id="elem1">
- Plain text.
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<elem3>
- &included-entity;
<elem4>
<?test processing instruction ?>
</elem4>
Index: php-src/ext/simplexml/tests/003.phpt
+++ php-src/ext/simplexml/tests/003.phpt
--TEST--
SimpleXML and Entities
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$sxe = simplexml_load_file(dirname(__FILE__).'/003.xml');
print_r($sxe);
echo "---Done---\n";
?>
--EXPECT--
simplexml_element Object
(
[elem1] => simplexml_element Object
(
[comment] => simplexml_element Object
(
)
[elem2] => simplexml_element Object
(
[elem3] => simplexml_element Object
(
[included-entity] => simplexml_element Object
(
[included-entity] => This is text included from an
entity
)
[elem4] => simplexml_element Object
(
[test] => simplexml_element Object
(
)
)
)
)
)
)
---Done---
Index: php-src/ext/simplexml/tests/003.xml
+++ php-src/ext/simplexml/tests/003.xml
<?xml version='1.0'?>
<!DOCTYPE sxe SYSTEM "notfound.dtd" [
<!ENTITY % incent SYSTEM "sxe.ent">
%incent;
]>
<sxe id="elem1">
Plain text.
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<elem3>
&included-entity;
<elem4>
<?test processing instruction ?>
</elem4>
</elem3>
</elem2>
</elem1>
</sxe>
Index: php-src/ext/simplexml/tests/004.phpt
+++ php-src/ext/simplexml/tests/004.phpt
--TEST--
SimpleXML and CDATA
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$sxe = simplexml_load_file(dirname(__FILE__).'/004.xml');
print_r($sxe);
echo "---Done---\n";
?>
--EXPECT--
simplexml_element Object
(
[elem1] => simplexml_element Object
(
[comment] => simplexml_element Object
(
)
[elem2] => simplexml_element Object
(
[elem3] => simplexml_element Object
(
[included-entity] => simplexml_element Object
(
[included-entity] => This is text included from an
entity
)
[elem4] => simplexml_element Object
(
[test] => simplexml_element Object
(
)
)
)
)
)
)
---Done---
Index: php-src/ext/simplexml/tests/004.xml
+++ php-src/ext/simplexml/tests/004.xml
<?xml version='1.0'?>
<!DOCTYPE sxe SYSTEM "notfound.dtd" [
<!ENTITY % incent SYSTEM "sxe.ent">
%incent;
]>
<sxe id="elem1">
Plain text.
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<![CDATA[CDATA block]]>
<elem3>
<elem4>
<?test processing instruction ?>
</elem4>
</elem3>
</elem2>
</elem1>
</sxe>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php