diff options
author | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
commit | 88ec761548b66f58acc1a86cdd0fc164ca925476 (patch) | |
tree | d0af978fa00d83bb1d82c613f66477fbd6bb18aa /ext/simplexml/tests | |
parent | 268984b4787e797db6054313fc9ba3b9e845306e (diff) | |
download | php-git-PECL_OPENSSL.tar.gz |
This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'.PECL_OPENSSL
Diffstat (limited to 'ext/simplexml/tests')
70 files changed, 0 insertions, 3305 deletions
diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt deleted file mode 100755 index 51dbe3b5ec..0000000000 --- a/ext/simplexml/tests/000.phpt +++ /dev/null @@ -1,254 +0,0 @@ ---TEST-- -SimpleXML: var_dump() ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$sxe = simplexml_load_file(dirname(__FILE__).'/000.xml'); - -function test($what) -{ - global $sxe; - echo "===$what\n"; - eval("var_dump(isset(\$$what));"); - eval("var_dump((bool)\$$what);"); - eval("var_dump(count(\$$what));"); - eval("var_dump(\$$what);"); -} - -test('sxe'); -test('sxe->elem1'); -test('sxe->elem1[0]'); -test('sxe->elem1[0]->elem2'); -test('sxe->elem1[0]->elem2->bla'); -if (!ini_get("unicode_semantics")) test('sxe->elem1[0]["attr1"]'); -test('sxe->elem1[0]->attr1'); -test('sxe->elem1[1]'); -test('sxe->elem1[2]'); -test('sxe->elem11'); -test('sxe->elem11->elem111'); -test('sxe->elem11->elem111->elem1111'); -test('sxe->elem22'); -test('sxe->elem22->elem222'); -test('sxe->elem22->attr22'); -test('sxe->elem22["attr22"]'); - -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -===sxe -bool(true) -bool(true) -int(3) -object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(3) "123" - } - ["elem1"]=> - array(2) { - [0]=> - string(36) "There is some text.Here is some more" - [1]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(2) { - ["attr1"]=> - string(2) "11" - ["attr2"]=> - string(2) "12" - } - } - } - ["elem11"]=> - object(SimpleXMLElement)#%d (1) { - ["elem111"]=> - object(SimpleXMLElement)#%d (1) { - ["elem1111"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } -} -===sxe->elem1 -bool(true) -bool(true) -int(2) -object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(2) { - ["attr1"]=> - string(5) "first" - ["attr2"]=> - string(6) "second" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(2) { - ["att25"]=> - string(2) "25" - ["att42"]=> - string(2) "42" - } - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } -} -===sxe->elem1[0] -bool(true) -bool(true) -int(1) -object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(2) { - ["attr1"]=> - string(5) "first" - ["attr2"]=> - string(6) "second" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(2) { - ["att25"]=> - string(2) "25" - ["att42"]=> - string(2) "42" - } - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } -} -===sxe->elem1[0]->elem2 -bool(true) -bool(true) -int(1) -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(2) { - ["att25"]=> - string(2) "25" - ["att42"]=> - string(2) "42" - } - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } -} -===sxe->elem1[0]->elem2->bla -bool(false) -bool(false) -int(0) -object(SimpleXMLElement)#%d (0) { -} -===sxe->elem1[0]["attr1"] -bool(true) -bool(true) -int(0) -object(SimpleXMLElement)#%d (1) { - [0]=> - string(5) "first" -} -===sxe->elem1[0]->attr1 -bool(false) -bool(false) -int(0) -object(SimpleXMLElement)#%d (0) { -} -===sxe->elem1[1] -bool(true) -bool(true) -int(0) -object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(2) { - ["attr1"]=> - string(2) "11" - ["attr2"]=> - string(2) "12" - } -} -===sxe->elem1[2] -bool(false) -bool(false) -int(0) -NULL -===sxe->elem11 -bool(true) -bool(true) -int(1) -object(SimpleXMLElement)#%d (1) { - ["elem111"]=> - object(SimpleXMLElement)#%d (1) { - ["elem1111"]=> - object(SimpleXMLElement)#%d (0) { - } - } -} -===sxe->elem11->elem111 -bool(true) -bool(true) -int(1) -object(SimpleXMLElement)#%d (1) { - ["elem1111"]=> - object(SimpleXMLElement)#%d (0) { - } -} -===sxe->elem11->elem111->elem1111 -bool(true) -bool(true) -int(1) -object(SimpleXMLElement)#%d (0) { -} -===sxe->elem22 -bool(false) -bool(false) -int(0) -object(SimpleXMLElement)#%d (0) { -} -===sxe->elem22->elem222 -bool(false) -bool(false) -int(0) -NULL -===sxe->elem22->attr22 -bool(false) -bool(false) -int(0) -NULL -===sxe->elem22["attr22"] -bool(false) -bool(false) -int(0) -NULL -===DONE=== diff --git a/ext/simplexml/tests/000.xml b/ext/simplexml/tests/000.xml deleted file mode 100755 index b0f2785463..0000000000 --- a/ext/simplexml/tests/000.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "sxe.dtd" [ -<!ENTITY % incent SYSTEM "sxe.ent"> -%incent; -]> -<sxe id="123"> - <elem1 attr1='first' attr2='second'>There is some text.<!-- comment --><elem2 att25='25' att42='42'> - <elem3> - <elem4> - <?test processing instruction ?> - </elem4> - </elem3> - </elem2>Here is some more</elem1> - <elem1 attr1='11' attr2='12'/> - <elem11><elem111><elem1111/></elem111></elem11> -</sxe>
\ No newline at end of file diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt deleted file mode 100644 index 0be77710e5..0000000000 --- a/ext/simplexml/tests/001.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -SimpleXML: Simple document ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -var_dump(simplexml_load_file(dirname(__FILE__).'/sxe.xml')); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (1) { - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/002.phpt b/ext/simplexml/tests/002.phpt deleted file mode 100644 index 4f1f6b6224..0000000000 --- a/ext/simplexml/tests/002.phpt +++ /dev/null @@ -1,64 +0,0 @@ ---TEST-- -SimpleXML: clone ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$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 = clone $sxe; - -var_dump($copy); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (1) { - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/003.phpt b/ext/simplexml/tests/003.phpt deleted file mode 100755 index 105f616d60..0000000000 --- a/ext/simplexml/tests/003.phpt +++ /dev/null @@ -1,69 +0,0 @@ ---TEST-- -SimpleXML: Entities ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$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; - -var_dump(simplexml_load_string($xml)); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (1) { - ["elem3"]=> - object(SimpleXMLElement)#%d (2) { - ["included-entity"]=> - object(SimpleXMLElement)#%d (1) { - ["included-entity"]=> - string(36) "This is text included from an entity" - } - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt deleted file mode 100755 index 21cb5469e0..0000000000 --- a/ext/simplexml/tests/004.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -SimpleXML: CDATA ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'> - <!-- comment --> - <elem2> - <![CDATA[CDATA block]]> - <elem3> - <elem4> - <?test processing instruction ?> - </elem4> - </elem3> - </elem2> - </elem1> -</sxe> -EOF -); - -var_dump($sxe); - -$elem1 = $sxe->elem1; -$elem2 = $elem1->elem2; -var_dump(trim((string)$elem2)); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (1) { - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } - } -} -string(11) "CDATA block" -===DONE=== diff --git a/ext/simplexml/tests/005.phpt b/ext/simplexml/tests/005.phpt deleted file mode 100755 index 1411065435..0000000000 --- a/ext/simplexml/tests/005.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -SimpleXML: Text data ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'> - <!-- comment --> - <elem2> - Here we have some text data. - <elem3> - And here some more. - <elem4> - Wow once again. - </elem4> - </elem3> - </elem2> - </elem1> -</sxe> -EOF -); - -var_dump(trim($sxe->elem1->elem2)); -var_dump(trim($sxe->elem1->elem2->elem3)); -var_dump(trim($sxe->elem1->elem2->elem3->elem4)); - -echo "---Done---\n"; - -?> ---EXPECT-- -string(28) "Here we have some text data." -string(19) "And here some more." -string(15) "Wow once again." ----Done--- diff --git a/ext/simplexml/tests/006.phpt b/ext/simplexml/tests/006.phpt deleted file mode 100755 index 72ad0c8089..0000000000 --- a/ext/simplexml/tests/006.phpt +++ /dev/null @@ -1,80 +0,0 @@ ---TEST-- -SimpleXML: foreach ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'> - Bla bla 1. - <!-- comment --> - <elem2> - Here we have some text data. - <elem3> - And here some more. - <elem4> - Wow once again. - </elem4> - </elem3> - </elem2> - </elem1> - <elem11 attr2='second'> - Bla bla 2. - <elem111> - Foo Bar - </elem111> - </elem11> -</sxe> -EOF -); - -foreach($sxe as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===CLONE===\n"; - -foreach(clone $sxe as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===ELEMENT===\n"; - -foreach($sxe->elem11 as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===COMMENT===\n"; - -foreach($sxe->elem1 as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -?> -===DONE=== ---EXPECT-- -string(5) "elem1" -string(10) "Bla bla 1." -string(6) "elem11" -string(10) "Bla bla 2." -===CLONE=== -string(5) "elem1" -string(10) "Bla bla 1." -string(6) "elem11" -string(10) "Bla bla 2." -===ELEMENT=== -string(6) "elem11" -string(10) "Bla bla 2." -===COMMENT=== -string(5) "elem1" -string(10) "Bla bla 1." -===DONE=== diff --git a/ext/simplexml/tests/007.phpt b/ext/simplexml/tests/007.phpt deleted file mode 100755 index 51d7a847f7..0000000000 --- a/ext/simplexml/tests/007.phpt +++ /dev/null @@ -1,97 +0,0 @@ ---TEST-- -SimpleXML: Attributes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$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); -echo "===Array===\n"; -var_dump($sxe['id']); -var_dump($sxe->elem1['attr1']); -echo "===Set===\n"; -$sxe['id'] = "Changed1"; -var_dump($sxe['id']); -$sxe->elem1['attr1'] = 12; -var_dump($sxe->elem1['attr1']); -echo "===Unset===\n"; -unset($sxe['id']); -var_dump($sxe['id']); -unset($sxe->elem1['attr1']); -var_dump($sxe->elem1['attr1']); -echo "===Misc.===\n"; -$a = 4; -var_dump($a); -$dummy = $sxe->elem1[$a]; -var_dump($a); -?> -===Done=== ---EXPECTF-- -===Property=== -object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(SimpleXMLElement)#%d (0) { - } - ["elem2"]=> - object(SimpleXMLElement)#%d (1) { - ["elem3"]=> - object(SimpleXMLElement)#%d (1) { - ["elem4"]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } - } - } -} -===Array=== -object(SimpleXMLElement)#%d (1) { - [0]=> - string(5) "elem1" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(5) "first" -} -===Set=== -object(SimpleXMLElement)#%d (1) { - [0]=> - string(8) "Changed1" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "12" -} -===Unset=== -NULL -NULL -===Misc.=== -int(4) -int(4) -===Done=== diff --git a/ext/simplexml/tests/008.phpt b/ext/simplexml/tests/008.phpt deleted file mode 100644 index 4fda204a2f..0000000000 --- a/ext/simplexml/tests/008.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -SimpleXML: XPath ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$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("***")); -?> ---EXPECTF-- -array(1) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["test"]=> - object(SimpleXMLElement)#%d (0) { - } - } -} -bool(false) diff --git a/ext/simplexml/tests/009.phpt b/ext/simplexml/tests/009.phpt deleted file mode 100755 index a76f3d1116..0000000000 --- a/ext/simplexml/tests/009.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -SimpleXML: foreach ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'> - Bla bla 1. - <!-- comment --> - <elem2> - Here we have some text data. - <elem3> - And here some more. - <elem4> - Wow once again. - </elem4> - </elem3> - </elem2> - </elem1> - <elem11 attr2='second'> - Bla bla 2. - </elem11> -</sxe> -EOF -); -foreach($sxe->children() as $name=>$val) { - var_dump($name); - var_dump(get_class($val)); - var_dump(trim($val)); -} -?> -===DONE=== ---EXPECT-- -string(5) "elem1" -string(16) "SimpleXMLElement" -string(10) "Bla bla 1." -string(6) "elem11" -string(16) "SimpleXMLElement" -string(10) "Bla bla 2." -===DONE=== diff --git a/ext/simplexml/tests/009b.phpt b/ext/simplexml/tests/009b.phpt deleted file mode 100755 index dba300c72f..0000000000 --- a/ext/simplexml/tests/009b.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -SimpleXML: foreach ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'>Bla bla 1.<!-- comment --><elem2> - Here we have some text data. - </elem2></elem1> - <elem11 attr2='second'>Bla bla 2.</elem11> -</sxe> -EOF -); -var_dump($sxe->children()); -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -object(SimpleXMLElement)#%d (3) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - string(10) "Bla bla 1." - ["elem11"]=> - string(10) "Bla bla 2." -} -===DONE=== diff --git a/ext/simplexml/tests/010.phpt b/ext/simplexml/tests/010.phpt deleted file mode 100644 index 267780905b..0000000000 --- a/ext/simplexml/tests/010.phpt +++ /dev/null @@ -1,64 +0,0 @@ ---TEST-- -SimpleXML: Simple Inheritance ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -class simplexml_inherited extends SimpleXMLElement -{ -} - -$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; - -var_dump(simplexml_load_string($xml, 'simplexml_inherited')); - -?> -===DONE=== ---EXPECTF-- -object(simplexml_inherited)#%d (2) { - ["@attributes"]=> - array(1) { - ["id"]=> - string(5) "elem1" - } - ["elem1"]=> - object(simplexml_inherited)#%d (3) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(5) "first" - } - ["comment"]=> - object(simplexml_inherited)#%d (0) { - } - ["elem2"]=> - object(simplexml_inherited)#%d (1) { - ["elem3"]=> - object(simplexml_inherited)#%d (1) { - ["elem4"]=> - object(simplexml_inherited)#%d (1) { - ["test"]=> - object(simplexml_inherited)#%d (0) { - } - } - } - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/011.phpt b/ext/simplexml/tests/011.phpt deleted file mode 100755 index 74ea4705ca..0000000000 --- a/ext/simplexml/tests/011.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -SimpleXML: echo/print ---SKIPIF-- -<?php - if (!extension_loaded('simplexml')) print 'skip'; -?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version="1.0" encoding="ISO-8859-1" ?> -<foo> - <bar>bar</bar> - <baz>baz1</baz> - <baz>baz2</baz> -</foo> -EOF; - -$sxe = simplexml_load_string($xml); - -echo "===BAR===\n"; -echo $sxe->bar; -echo "\n"; - -echo "===BAZ===\n"; -echo $sxe->baz; -echo "\n"; - -echo "===BAZ0===\n"; -echo $sxe->baz[0]; -echo "\n"; - -echo "===BAZ1===\n"; -print $sxe->baz[1]; -echo "\n"; -?> -===DONE=== ---EXPECT-- -===BAR=== -bar -===BAZ=== -baz1 -===BAZ0=== -baz1 -===BAZ1=== -baz2 -===DONE=== diff --git a/ext/simplexml/tests/012.phpt b/ext/simplexml/tests/012.phpt deleted file mode 100755 index 2fc9bec41e..0000000000 --- a/ext/simplexml/tests/012.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -SimpleXML: Attribute creation ---SKIPIF-- -<?php - if (!extension_loaded('simplexml')) print 'skip'; -?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version="1.0" encoding="ISO-8859-1" ?> -<foo/> -EOF; - -$sxe = simplexml_load_string($xml); - - -$sxe[""] = "warning"; -$sxe["attr"] = "value"; - -echo $sxe->asXML(); - -$sxe["attr"] = "new value"; - -echo $sxe->asXML(); - -$sxe[] = "error"; - -__HALT_COMPILER(); -?> -===DONE=== ---EXPECTF-- - -Warning: main(): Cannot write or create unnamed attribute in %s012.php on line %d -<?xml version="1.0" encoding="ISO-8859-1"?> -<foo attr="value"/> -<?xml version="1.0" encoding="ISO-8859-1"?> -<foo attr="new value"/> - -Fatal error: main(): Cannot create unnamed attribute in %s012.php on line %d diff --git a/ext/simplexml/tests/013.phpt b/ext/simplexml/tests/013.phpt deleted file mode 100755 index 56c57dfbc2..0000000000 --- a/ext/simplexml/tests/013.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -SimpleXML: Split text content ---SKIPIF-- -<?php - if (!extension_loaded('simplexml')) print 'skip'; -?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version="1.0" encoding="ISO-8859-1" ?> -<foo>bar<baz/>bar</foo> -EOF; - -$sxe = simplexml_load_string($xml); - -var_dump((string)$sxe); - -?> -===DONE=== ---EXPECT-- -string(6) "barbar" -===DONE=== diff --git a/ext/simplexml/tests/014.phpt b/ext/simplexml/tests/014.phpt deleted file mode 100644 index d1d736e7b5..0000000000 --- a/ext/simplexml/tests/014.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -SimpleXML: adding/removing attributes (direct) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person['name']); -var_dump($people->person['age']); -$person = $people->person; -$person['name'] = "XXX"; -var_dump($people->person['name']); -$people->person['age'] = 30; -var_dump($people->person['age']); -echo "---Unset:---\n"; -unset($people->person['age']); -echo "---Unset?---\n"; -var_dump($people->person['age']); -var_dump(isset($people->person['age'])); -$people->person['age'] = 30; -echo "---Unsupported---\n"; -var_dump($people->person['age']); -$people->person['age'] += 5; -var_dump($people->person['age']); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "XXX" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "30" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "35" -} -===DONE=== diff --git a/ext/simplexml/tests/014a.phpt b/ext/simplexml/tests/014a.phpt deleted file mode 100755 index 649828b4dd..0000000000 --- a/ext/simplexml/tests/014a.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -SimpleXML: adding/removing attributes (single) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person[0]['name']); -var_dump($people->person[0]['age']); -$person = $people->person[0]; -$person['name'] = "XXX"; -var_dump($people->person[0]['name']); -$people->person[0]['age'] = 30; -var_dump($people->person[0]['age']); -echo "---Unset:---\n"; -unset($people->person[0]['age']); -echo "---Unset?---\n"; -var_dump($people->person[0]['age']); -var_dump(isset($people->person[0]['age'])); -echo "---Unsupported---\n"; -var_dump($people->person[0]['age']); -$people->person['age'] += 5; -var_dump($people->person[0]['age']); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "XXX" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -NULL -object(SimpleXMLElement)#%d (1) { - [0]=> - string(1) "5" -} -===DONE=== diff --git a/ext/simplexml/tests/014b.phpt b/ext/simplexml/tests/014b.phpt deleted file mode 100755 index 034396751a..0000000000 --- a/ext/simplexml/tests/014b.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -SimpleXML: adding/removing attributes (second) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"></person> - <person name="Boe"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person[0]['name']); -var_dump($people->person[1]['age']); -$person = $people->person[1]; -$person['name'] = "XXX"; -var_dump($people->person[1]['name']); -$people->person[1]['age'] = 30; -var_dump($people->person[1]['age']); -echo "---Unset:---\n"; -unset($people->person[1]['age']); -echo "---Unset?---\n"; -var_dump($people->person[1]['age']); -var_dump(isset($people->person[1]['age'])); -echo "---Unsupported---\n"; -$people->person[1]['age'] += 5; -var_dump($people->person[1]['age']); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "XXX" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(1) "5" -} -===DONE=== diff --git a/ext/simplexml/tests/015.phpt b/ext/simplexml/tests/015.phpt deleted file mode 100644 index 11e9cd55cd..0000000000 --- a/ext/simplexml/tests/015.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -SimpleXML: accessing singular subnode as array ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"></person> -</people> -EOF; - -$xml2 =<<<EOF -<people> - <person name="Joe"></person> - <person name="Boe"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person['name']); -var_dump($people->person[0]['name']); -//$people->person['name'] = "XXX"; -//var_dump($people->person['name']); -//var_dump($people->person[0]['name']); -//$people->person[0]['name'] = "YYY"; -//var_dump($people->person['name']); -//var_dump($people->person[0]['name']); -//unset($people->person[0]['name']); -//var_dump($people->person['name']); -//var_dump($people->person[0]['name']); -//var_dump(isset($people->person['name'])); -//var_dump(isset($people->person[0]['name'])); -$people = simplexml_load_string($xml2); -var_dump($people->person[0]['name']); -var_dump($people->person[1]['name']); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Boe" -} -===DONE=== diff --git a/ext/simplexml/tests/016.phpt b/ext/simplexml/tests/016.phpt deleted file mode 100644 index ab80a7a19a..0000000000 --- a/ext/simplexml/tests/016.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -SimpleXML: modifying attributes of singular subnode ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person['name']); -$people->person['name'] = $people->person['name'] . 'Foo'; -var_dump($people->person['name']); -$people->person['name'] .= 'Bar'; -var_dump($people->person['name']); - -echo "---[0]---\n"; - -$people = simplexml_load_string($xml); -var_dump($people->person[0]['name']); -$people->person[0]['name'] = $people->person[0]['name'] . 'Foo'; -var_dump($people->person[0]['name']); -$people->person[0]['name'] .= 'Bar'; -var_dump($people->person[0]['name']); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(6) "JoeFoo" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(9) "JoeFooBar" -} ----[0]--- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Joe" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(6) "JoeFoo" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(9) "JoeFooBar" -} -===DONE=== diff --git a/ext/simplexml/tests/016a.phpt b/ext/simplexml/tests/016a.phpt deleted file mode 100755 index 9797e29305..0000000000 --- a/ext/simplexml/tests/016a.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -SimpleXML: concatenating attributes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Foo"></person> -</people> -EOF; - -$people = simplexml_load_string($xml); -var_dump($people->person['name']); -$people->person['name'] .= 'Bar'; -var_dump($people->person['name']); - -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(3) "Foo" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(6) "FooBar" -} -===DONE=== diff --git a/ext/simplexml/tests/017.phpt b/ext/simplexml/tests/017.phpt deleted file mode 100644 index 776b00c785..0000000000 --- a/ext/simplexml/tests/017.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -SimpleXML: iteration through subnodes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"> - <child name="Ann" /> - <child name="Marray" /> - </person> - <person name="Boe"> - <child name="Joe" /> - <child name="Ann" /> - </person> -</people> -EOF; -$xml1 =<<<EOF -<people> - <person name="Joe"> - <child name="Ann" /> - </person> -</people> -EOF; - -function print_xml($xml) { - foreach($xml->children() as $person) { - echo "person: ".$person['name']."\n"; - foreach($person->children() as $child) { - echo " child: ".$child['name']."\n"; - } - } -} - -function print_xml2($xml) { - $persons = 2; - for ($i=0;$i<$persons;$i++) { - echo "person: ".$xml->person[$i]['name']."\n"; - $children = 2; - for ($j=0;$j<$children;$j++) { - echo " child: ".$xml->person[$i]->child[$j]['name']."\n"; - } - } -} - -echo "---11---\n"; -print_xml(simplexml_load_string($xml)); -echo "---12---\n"; -print_xml(simplexml_load_string($xml1)); -echo "---21---\n"; -print_xml2(simplexml_load_string($xml)); -echo "---22---\n"; -print_xml2(simplexml_load_string($xml1)); -?> -===DONE=== ---EXPECTF-- ----11--- -person: Joe - child: Ann - child: Marray -person: Boe - child: Joe - child: Ann ----12--- -person: Joe - child: Ann ----21--- -person: Joe - child: Ann - child: Marray -person: Boe - child: Joe - child: Ann ----22--- -person: Joe - child: Ann - child: -person: - -Notice: Trying to get property of non-object in %s017.php on line %d - child: - -Notice: Trying to get property of non-object in %s017.php on line %d - child: -===DONE=== diff --git a/ext/simplexml/tests/018.phpt b/ext/simplexml/tests/018.phpt deleted file mode 100644 index e5c810944e..0000000000 --- a/ext/simplexml/tests/018.phpt +++ /dev/null @@ -1,65 +0,0 @@ ---TEST-- -SimpleXML: iteration through subnodes and attributes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"> - Text1 - <child name="Ann" /> - Text2 - <child name="Marray" /> - Text3 - </person> - <person name="Boe"> - <child name="Joe" /> - <child name="Ann" /> - </person> -</people> -EOF; -$xml1 =<<<EOF -<people> - <person name="Joe"> - <child /> - </person> -</people> -EOF; - -function traverse_xml($pad,$xml) { - foreach($xml->children() as $name => $node) { - echo $pad."<$name"; - foreach($node->attributes() as $attr => $value) { - echo " $attr=\"$value\""; - } - echo ">\n"; - traverse_xml($pad." ",$node); - echo $pad."</$name>\n"; - } -} - -traverse_xml("",simplexml_load_string($xml)); -echo "----------\n"; -traverse_xml("",simplexml_load_string($xml1)); -echo "---Done---\n"; -?> ---EXPECT-- -<person name="Joe"> - <child name="Ann"> - </child> - <child name="Marray"> - </child> -</person> -<person name="Boe"> - <child name="Joe"> - </child> - <child name="Ann"> - </child> -</person> ----------- -<person name="Joe"> - <child> - </child> -</person> ----Done---
\ No newline at end of file diff --git a/ext/simplexml/tests/019.phpt b/ext/simplexml/tests/019.phpt deleted file mode 100755 index aec74ba42e..0000000000 --- a/ext/simplexml/tests/019.phpt +++ /dev/null @@ -1,80 +0,0 @@ ---TEST-- -SimpleXML: foreach with children() ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$sxe = simplexml_load_string(<<<EOF -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd"> -<sxe id="elem1"> - Plain text. - <elem1 attr1='first'> - Bla bla 1. - <!-- comment --> - <elem2> - Here we have some text data. - <elem3> - And here some more. - <elem4> - Wow once again. - </elem4> - </elem3> - </elem2> - </elem1> - <elem11 attr2='second'> - Bla bla 2. - <elem111> - Foo Bar - </elem111> - </elem11> -</sxe> -EOF -); - -foreach($sxe->children() as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===CLONE===\n"; - -foreach(clone $sxe->children() as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===ELEMENT===\n"; - -foreach($sxe->elem11->children() as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -echo "===COMMENT===\n"; - -foreach($sxe->elem1->children() as $name => $data) { - var_dump($name); - var_dump(trim($data)); -} - -?> -===DONE=== ---EXPECT-- -string(5) "elem1" -string(10) "Bla bla 1." -string(6) "elem11" -string(10) "Bla bla 2." -===CLONE=== -string(5) "elem1" -string(10) "Bla bla 1." -string(6) "elem11" -string(10) "Bla bla 2." -===ELEMENT=== -string(7) "elem111" -string(7) "Foo Bar" -===COMMENT=== -string(5) "elem2" -string(28) "Here we have some text data." -===DONE=== diff --git a/ext/simplexml/tests/020.phpt b/ext/simplexml/tests/020.phpt deleted file mode 100755 index 9e91b5ac3a..0000000000 --- a/ext/simplexml/tests/020.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -SimpleXML: Attribute compared to string ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$doc = simplexml_load_string('<root><name attr="foo">bar</name></root>'); -print $doc->name["attr"]; -print "\n"; -if ($doc->name["attr"] == "foo") { - print "Works\n"; -} else { - print "Error\n"; -} -?> -===DONE=== ---EXPECT-- -foo -Works -===DONE=== diff --git a/ext/simplexml/tests/021.phpt b/ext/simplexml/tests/021.phpt deleted file mode 100644 index d5138685f5..0000000000 --- a/ext/simplexml/tests/021.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -SimpleXML: Element check ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$ok = 1; -$doc = simplexml_load_string('<root><exists>foo</exists></root>'); -if(!isset($doc->exists)) { - $ok *= 0; -} -if(isset($doc->doesnotexist)) { - $ok *= 0; -} -if ($ok) { - print "Works\n"; -} else { - print "Error\n"; -} -?> -===DONE=== ---EXPECT-- -Works -===DONE=== diff --git a/ext/simplexml/tests/022.phpt b/ext/simplexml/tests/022.phpt deleted file mode 100755 index 2af4a1dd28..0000000000 --- a/ext/simplexml/tests/022.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -SimpleXML: Attributes inside foreach ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version='1.0'?> -<pres><content><file glob="slide_*.xml"/></content></pres> -EOF; - -$sxe = simplexml_load_string($xml); - -echo "===CONTENT===\n"; -var_dump($sxe->content); - -echo "===FILE===\n"; -var_dump($sxe->content->file); - -echo "===FOREACH===\n"; -foreach($sxe->content->file as $file) -{ - var_dump($file); - var_dump($file['glob']); -} - -?> -===DONE=== ---EXPECTF-- -===CONTENT=== -object(SimpleXMLElement)#%d (1) { - ["file"]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["glob"]=> - string(11) "slide_*.xml" - } - } -} -===FILE=== -object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["glob"]=> - string(11) "slide_*.xml" - } -} -===FOREACH=== -object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["glob"]=> - string(11) "slide_*.xml" - } -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(11) "slide_*.xml" -} -===DONE=== diff --git a/ext/simplexml/tests/023.phpt b/ext/simplexml/tests/023.phpt deleted file mode 100755 index 515a1460c9..0000000000 --- a/ext/simplexml/tests/023.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -SimpleXML: Attributes with entities ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version='1.0'?> -<!DOCTYPE talks SYSTEM "nbsp.dtd" [ -<!ELEMENT root EMPTY> -<!ATTLIST root attr1 CDATA #IMPLIED> -<!ENTITY nbsp "&#x00A0;"> -]> -<root attr='foo bar baz'></root> -EOF; - -$sxe = simplexml_load_string($xml); - -var_dump($sxe); -var_dump($sxe['attr']); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr"]=> - string(%d) "foo%sbar%sbaz" - } -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(%d) "foo%sbar%sbaz" -} -===DONE=== diff --git a/ext/simplexml/tests/024.phpt b/ext/simplexml/tests/024.phpt deleted file mode 100755 index 9f31fd5e93..0000000000 --- a/ext/simplexml/tests/024.phpt +++ /dev/null @@ -1,175 +0,0 @@ ---TEST-- -SimpleXML: XPath and attributes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version='1.0'?> -<root> -<elem attr1='11' attr2='12' attr3='13'/> -<elem attr1='21' attr2='22' attr3='23'/> -<elem attr1='31' attr2='32' attr3='33'/> -</root> -EOF; - -$sxe = simplexml_load_string($xml); - -function test($xpath) -{ - global $sxe; - - echo "===$xpath===\n"; - var_dump($sxe->xpath($xpath)); -} - -test('elem/@attr2'); -test('//@attr2'); -test('//@*'); -test('elem[2]/@attr2'); - -?> -===DONE=== ---EXPECTF-- -===elem/@attr2=== -array(3) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "12" - } - } - [1]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "22" - } - } - [2]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "32" - } - } -} -===//@attr2=== -array(3) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "12" - } - } - [1]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "22" - } - } - [2]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "32" - } - } -} -===//@*=== -array(9) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(2) "11" - } - } - [1]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "12" - } - } - [2]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr3"]=> - string(2) "13" - } - } - [3]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(2) "21" - } - } - [4]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "22" - } - } - [5]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr3"]=> - string(2) "23" - } - } - [6]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr1"]=> - string(2) "31" - } - } - [7]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "32" - } - } - [8]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr3"]=> - string(2) "33" - } - } -} -===elem[2]/@attr2=== -array(1) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["attr2"]=> - string(2) "22" - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/025.phpt b/ext/simplexml/tests/025.phpt deleted file mode 100755 index b9e3bbb0dc..0000000000 --- a/ext/simplexml/tests/025.phpt +++ /dev/null @@ -1,92 +0,0 @@ ---TEST-- -SimpleXML: getting namespaces ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version='1.0'?> -<xhtml:html xmlns:html='http://www.w3.org/1999/xhtml' xmlns:xhtml='http://www.w3.org/TR/REC-html40'> -<xhtml:head><xhtml:title xmlns:xhtml='http://www.w3.org/TR/REC-html401'>bla</xhtml:title></xhtml:head> -<xhtml:body html:title="b"> -<html:h1>bla</html:h1> -<foo:bar xmlns:foo='foobar' xmlns:baz='foobarbaz'/> -</xhtml:body> -</xhtml:html> -EOF; - -$sxe = simplexml_load_string($xml); - -var_dump($sxe->getNamespaces()); -var_dump($sxe->getNamespaces(true)); -var_dump($sxe->getDocNamespaces()); -var_dump($sxe->getDocNamespaces(true)); - -$xml =<<<EOF -<?xml version='1.0'?> -<html xmlns='http://www.w3.org/1999/xhtml'> -<head><title xmlns='http://www.w3.org/TR/REC-html40'>bla</title></head> -</html> -EOF; - -$sxe = simplexml_load_string($xml); - -var_dump($sxe->getNamespaces()); -var_dump($sxe->getDocNamespaces()); - -$xml =<<<EOF -<?xml version='1.0'?> -<root/> -EOF; - -$sxe = simplexml_load_string($xml); - -var_dump($sxe->getNamespaces()); -var_dump($sxe->getDocNamespaces()); - -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -array(1) { - ["xhtml"]=> - string(31) "http://www.w3.org/TR/REC-html40" -} -array(3) { - ["xhtml"]=> - string(31) "http://www.w3.org/TR/REC-html40" - ["html"]=> - string(28) "http://www.w3.org/1999/xhtml" - ["foo"]=> - string(6) "foobar" -} -array(2) { - ["html"]=> - string(28) "http://www.w3.org/1999/xhtml" - ["xhtml"]=> - string(31) "http://www.w3.org/TR/REC-html40" -} -array(4) { - ["html"]=> - string(28) "http://www.w3.org/1999/xhtml" - ["xhtml"]=> - string(31) "http://www.w3.org/TR/REC-html40" - ["foo"]=> - string(6) "foobar" - ["baz"]=> - string(9) "foobarbaz" -} -array(1) { - [""]=> - string(28) "http://www.w3.org/1999/xhtml" -} -array(1) { - [""]=> - string(28) "http://www.w3.org/1999/xhtml" -} -array(0) { -} -array(0) { -} -===DONE=== diff --git a/ext/simplexml/tests/026.phpt b/ext/simplexml/tests/026.phpt deleted file mode 100755 index d6de94be3d..0000000000 --- a/ext/simplexml/tests/026.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -SimpleXML: getName() ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person>Jane</person> -</people> -EOF; - -function traverse_xml($xml, $pad = '') -{ - $name = $xml->getName(); - echo "$pad<$name"; - foreach($xml->attributes() as $attr => $value) - { - echo " $attr=\"$value\""; - } - echo ">" . trim($xml) . "\n"; - foreach($xml->children() as $node) - { - traverse_xml($node, $pad.' '); - } - echo $pad."</$name>\n"; -} - - -$people = simplexml_load_string($xml); -traverse_xml($people); - -?> -===DONE=== ---EXPECTF-- -<people> - <person>Jane - </person> -</people> -===DONE=== diff --git a/ext/simplexml/tests/027.phpt b/ext/simplexml/tests/027.phpt deleted file mode 100755 index f32786c7cc..0000000000 --- a/ext/simplexml/tests/027.phpt +++ /dev/null @@ -1,74 +0,0 @@ ---TEST-- -SimpleXML: Adding an elements ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people></people> -EOF; - -function traverse_xml($xml, $pad = '') -{ - $name = $xml->getName(); - echo "$pad<$name"; - foreach($xml->attributes() as $attr => $value) - { - echo " $attr=\"$value\""; - } - echo ">" . trim($xml) . "\n"; - foreach($xml->children() as $node) - { - traverse_xml($node, $pad.' '); - } - echo $pad."</$name>\n"; -} - - -$people = simplexml_load_string($xml); -traverse_xml($people); -$people->person = 'Joe'; -$people->person['gender'] = 'male'; -traverse_xml($people); -$people->person = 'Jane'; -traverse_xml($people); -$people->person['gender'] = 'female'; -$people->person[1] = 'Joe'; -$people->person[1]['gender'] = 'male'; -traverse_xml($people); -$people->person[3] = 'Minni-me'; -$people->person[2]['gender'] = 'male'; -traverse_xml($people); -$people->person[3]['gender'] = 'error'; - -?> -===DONE=== ---EXPECTF-- -<people> -</people> -<people> - <person gender="male">Joe - </person> -</people> -<people> - <person gender="male">Jane - </person> -</people> -<people> - <person gender="female">Jane - </person> - <person gender="male">Joe - </person> -</people> - -Warning: main(): Cannot add element person number 3 when only 2 such elements exist in %s027.php on line %d -<people> - <person gender="female">Jane - </person> - <person gender="male">Joe - </person> - <person gender="male">Minni-me - </person> -</people> - -Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %s027.php on line %d diff --git a/ext/simplexml/tests/028.phpt b/ext/simplexml/tests/028.phpt deleted file mode 100755 index 753056b9ad..0000000000 --- a/ext/simplexml/tests/028.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -SimpleXML: Adding an elements without text ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people></people> -EOF; - -function traverse_xml($xml, $pad = '') -{ - $name = $xml->getName(); - echo "$pad<$name"; - foreach($xml->attributes() as $attr => $value) - { - echo " $attr=\"$value\""; - } - echo ">" . trim($xml) . "\n"; - foreach($xml->children() as $node) - { - traverse_xml($node, $pad.' '); - } - echo $pad."</$name>\n"; -} - - -$people = simplexml_load_string($xml); -traverse_xml($people); -$people->person['name'] = 'John'; -traverse_xml($people); - -?> -===DONE=== ---EXPECTF-- -<people> -</people> -<people> - <person name="John"> - </person> -</people> -===DONE=== diff --git a/ext/simplexml/tests/029.phpt b/ext/simplexml/tests/029.phpt deleted file mode 100755 index 86a4f308e3..0000000000 --- a/ext/simplexml/tests/029.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -SimpleXML: foreach and count ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"/> - <person name="John"> - <children> - <person name="Joe"/> - </children> - </person> - <person name="Jane"/> -</people> -EOF; - -$people = simplexml_load_string($xml); - -foreach($people as $person) -{ - var_dump((string)$person['name']); - var_dump(count($people)); - var_dump(count($person)); -} - -?> -===DONE=== ---EXPECTF-- -string(3) "Joe" -int(3) -int(0) -string(4) "John" -int(3) -int(1) -string(4) "Jane" -int(3) -int(0) -===DONE=== diff --git a/ext/simplexml/tests/030.phpt b/ext/simplexml/tests/030.phpt deleted file mode 100644 index 774a5f1459..0000000000 --- a/ext/simplexml/tests/030.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -SimpleXML: isset and unset by offset ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<root s:att1="b" att1="a" - xmlns:s="urn::test" xmlns:t="urn::test-t"> - <child1>test</child1> - <child1>test 2</child1> - <s:child3 /> -</root> -EOF; - -$sxe = simplexml_load_string($xml); - -echo $sxe->child1[0]."\n"; -echo $sxe->child1[1]."\n\n"; - -var_dump(isset($sxe->child1[1])); -unset($sxe->child1[1]); -var_dump(isset($sxe->child1[1])); -echo "\n"; - -$atts = $sxe->attributes("urn::test"); -var_dump(isset($atts[0])); -unset($atts[0]); -var_dump(isset($atts[0])); -var_dump(isset($atts[TRUE])); - -?> -===DONE=== ---EXPECT-- -test -test 2 - -bool(true) -bool(false) - -bool(true) -bool(false) -bool(false) -===DONE=== diff --git a/ext/simplexml/tests/031.phpt b/ext/simplexml/tests/031.phpt deleted file mode 100644 index cd2d266ba1..0000000000 --- a/ext/simplexml/tests/031.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -SimpleXML: addChild and addAttribute ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<root s:att1="b" att1="a" - xmlns:s="urn::test" xmlns:t="urn::test-t"> - <child1>test</child1> - <child1>test 2</child1> - <s:child3 /> -</root> -EOF; - -$sxe = simplexml_load_string($xml); - -/* Add new attribute in a new namespace */ -$sxe->addAttribute('v:att11', 'xxx', 'urn::test-v'); - -/* Try to add attribute again -> display warning as method is for new Attr only */ -$sxe->addAttribute('v:att11', 'xxx', 'urn::test-v'); - -/* Add new attribute w/o namespace */ -$sxe->addAttribute('att2', 'no-ns'); - -$d = $sxe->attributes(); -/* Try to add element to attribute -> display warning and do not add */ -$d->addChild('m:test', 'myval', 'urn::test'); - - -/* Test adding elements in various configurations */ -$sxe->addChild('m:test1', 'myval', 'urn::test'); - -/* New namespace test */ -$n = $sxe->addChild('m:test2', 'myval', 'urn::testnew'); - -$sxe->addChild('test3', 'myval', 'urn::testnew'); -$sxe->addChild('test4', 'myval'); - -/* Does not add prefix here although name is valid (but discouraged) - change behavior? */ -$sxe->addChild('s:test5', 'myval'); - -echo $sxe->asXML(); -?> -===DONE=== ---EXPECTF-- -Warning: SimpleXMLElement::addAttribute(): Attribute already exists in %s031.php on line %d - -Warning: SimpleXMLElement::addChild(): Cannot add element to attributes in %s031.php on line %d -<?xml version="1.0"?> -<root xmlns:s="urn::test" xmlns:t="urn::test-t" xmlns:v="urn::test-v" s:att1="b" att1="a" v:att11="xxx" att2="no-ns"> - <child1>test</child1> - <child1>test 2</child1> - <s:child3/> -<s:test1>myval</s:test1><m:test2 xmlns:m="urn::testnew">myval</m:test2><test3 xmlns="urn::testnew">myval</test3><test4>myval</test4><test5>myval</test5></root> -===DONE=== diff --git a/ext/simplexml/tests/032.phpt b/ext/simplexml/tests/032.phpt deleted file mode 100755 index 48bc887ecc..0000000000 --- a/ext/simplexml/tests/032.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -SimpleXML: comparing instances ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml =<<<EOF -<people> - <person name="Joe"/> - <person name="John"> - <children> - <person name="Joe"/> - </children> - </person> - <person name="Jane"/> -</people> -EOF; - -$xml1 =<<<EOF -<people> - <person name="John"> - <children> - <person name="Joe"/> - </children> - </person> - <person name="Jane"/> -</people> -EOF; - - -$people = simplexml_load_string($xml); -$people1 = simplexml_load_string($xml); -$people2 = simplexml_load_string($xml1); - -var_dump($people1 == $people); -var_dump($people2 == $people); -var_dump($people2 == $people1); - -?> -===DONE=== ---EXPECTF-- -bool(false) -bool(false) -bool(false) -===DONE=== diff --git a/ext/simplexml/tests/033.phpt b/ext/simplexml/tests/033.phpt deleted file mode 100755 index ba01b21555..0000000000 --- a/ext/simplexml/tests/033.phpt +++ /dev/null @@ -1,137 +0,0 @@ ---TEST-- -SimpleXML: casting instances ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<people> -test - <person name="Joe"/> - <person name="John"> - <children> - <person name="Joe"/> - </children> - </person> - <person name="Jane"/> -</people> -EOF; - -$foo = simplexml_load_string( "<foo />" ); -$people = simplexml_load_string($xml); - -var_dump((bool)$foo); -var_dump((bool)$people); -var_dump((int)$foo); -var_dump((int)$people); -var_dump((double)$foo); -var_dump((double)$people); -var_dump((string)$foo); -var_dump((string)$people); -var_dump((array)$foo); -var_dump((array)$people); -var_dump((object)$foo); -var_dump((object)$people); - -?> -===DONE=== ---EXPECTF-- -bool(false) -bool(true) -int(0) -int(0) -float(0) -float(0) -string(0) "" -string(15) " -test - - - -" -array(0) { -} -array(1) { - ["person"]=> - array(3) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(3) "Joe" - } - } - [1]=> - object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(4) "John" - } - ["children"]=> - object(SimpleXMLElement)#%d (1) { - ["person"]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(3) "Joe" - } - } - } - } - [2]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(4) "Jane" - } - } - } -} -object(SimpleXMLElement)#%d (0) { -} -object(SimpleXMLElement)#%d (1) { - ["person"]=> - array(3) { - [0]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(3) "Joe" - } - } - [1]=> - object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(4) "John" - } - ["children"]=> - object(SimpleXMLElement)#%d (1) { - ["person"]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(3) "Joe" - } - } - } - } - [2]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["name"]=> - string(4) "Jane" - } - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/book.xml b/ext/simplexml/tests/book.xml deleted file mode 100644 index ea40508e01..0000000000 --- a/ext/simplexml/tests/book.xml +++ /dev/null @@ -1,10 +0,0 @@ -<books> - <book> - <title>The Grapes of Wrath</title> - <author>John Steinbeck</author> - </book> - <book> - <title>The Pearl</title> - <author>John Steinbeck</author> - </book> -</books> diff --git a/ext/simplexml/tests/bug24392.phpt b/ext/simplexml/tests/bug24392.phpt deleted file mode 100644 index 0a462e5770..0000000000 --- a/ext/simplexml/tests/bug24392.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Bug #24392 (empty namespaces causing confusion) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?> ---FILE-- -<?php -$s = simplexml_load_file(dirname(__FILE__).'/bug24392.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/bug24392.xml b/ext/simplexml/tests/bug24392.xml deleted file mode 100644 index d669f1df41..0000000000 --- a/ext/simplexml/tests/bug24392.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?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 diff --git a/ext/simplexml/tests/bug25756.xsd b/ext/simplexml/tests/bug25756.xsd deleted file mode 100644 index 427b7a1a14..0000000000 --- a/ext/simplexml/tests/bug25756.xsd +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <xsd:element name="foo" type="foo-type" /> - <xsd:complexType name="item-type"> - <xsd:all> - <xsd:element name="product-name" type="xsd:string" - minOccurs="1" maxOccurs="1"/> - <xsd:element name="quantity" type="xsd:decimal" - minOccurs="1" maxOccurs="1"/> - </xsd:all> - </xsd:complexType> - <xsd:complexType name="foo-type"> - <xsd:sequence> - <xsd:element name="items" minoccurs="1" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="item" type="item-type" - minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> -</xsd:schema> diff --git a/ext/simplexml/tests/bug25756_1.xml b/ext/simplexml/tests/bug25756_1.xml deleted file mode 100644 index 33ab30be10..0000000000 --- a/ext/simplexml/tests/bug25756_1.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<foo> - <items> - <item> - <product-name>abc</product-name> - <quantity>123</quantity> - </item> - <item> - <product-name>def</product-name> - <quantity>456</quantity> - </item> - </items> -</foo> diff --git a/ext/simplexml/tests/bug25756_2.xml b/ext/simplexml/tests/bug25756_2.xml deleted file mode 100644 index 53037ef769..0000000000 --- a/ext/simplexml/tests/bug25756_2.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<foo> - <items> - <item> - <product-name>abc</product-name> - <quantity>abc</quantity> - </item> - <item> - <product-name>abc</product-name> - <quantity>123</quantity> - </item> - </items> -</foo> diff --git a/ext/simplexml/tests/bug26976.phpt b/ext/simplexml/tests/bug26976.phpt deleted file mode 100644 index 657c229737..0000000000 --- a/ext/simplexml/tests/bug26976.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #26976 (Can not access array elements using array indices) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?> ---FILE-- -<?php - -$root = simplexml_load_string( -'<?xml version="1.0"?> -<root> - <child>a</child> - <child>b</child> - <child>c</child> - <child>d</child> -</root> -'); - -echo $root->child[0], "\n"; -echo $root->child[1], "\n"; -echo $root->child[2], "\n"; -echo $root->child[3], "\n"; - -?> ---EXPECT-- -a -b -c -d diff --git a/ext/simplexml/tests/bug27010.phpt b/ext/simplexml/tests/bug27010.phpt deleted file mode 100755 index 364ca4675f..0000000000 --- a/ext/simplexml/tests/bug27010.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Bug #27010 (segfault and node text not displayed when returned from children()) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml=<<<EOF -<drinks xmlns:hot="http://www.example.com/hot"> - <hot:drink><hot:name>Coffee</hot:name></hot:drink> - <hot:drink><hot:name>Tea</hot:name></hot:drink> - <drink><name>Cola</name></drink> - <drink><name>Juice</name></drink> -</drinks> -EOF; - -$sxe = simplexml_load_string($xml); - -foreach ($sxe as $element_name => $element) { - print "$element_name is $element->name\n"; -} - -foreach ($sxe->children('http://www.example.com/hot') as $element_name => $element) { - print "$element_name is $element->name\n"; -} - -?> -===DONE=== ---EXPECT-- -drink is Cola -drink is Juice -drink is Coffee -drink is Tea -===DONE=== diff --git a/ext/simplexml/tests/bug35785.phpt b/ext/simplexml/tests/bug35785.phpt deleted file mode 100755 index 096ab7a681..0000000000 --- a/ext/simplexml/tests/bug35785.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #35785 (SimpleXML memory read error) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml = simplexml_load_string("<root></root>"); -$xml->bla->posts->name = "FooBar"; -echo $xml->asXML(); - -echo "===FAIL===\n"; - -$xml = simplexml_load_string("<root></root>"); -$count = count($xml->bla->posts); -var_dump($count); -$xml->bla->posts[++$count]->name = "FooBar"; -echo $xml->asXML(); -?> -===DONE=== -<?php exit(0); __halt_compiler(); ?> ---EXPECTF-- -<?xml version="1.0"?> -<root><bla><posts><name>FooBar</name></posts></bla></root> -===FAIL=== -int(0) - -Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sbug35785.php on line %d diff --git a/ext/simplexml/tests/bug36611.phpt b/ext/simplexml/tests/bug36611.phpt deleted file mode 100644 index 835e926fe5..0000000000 --- a/ext/simplexml/tests/bug36611.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Bug #36611 (assignment to SimpleXML object attribute changes argument type to string) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml_str = <<<EOD -<?xml version="1.0" encoding="ISO-8859-1" ?> -<c_fpobel > - <pos > - <pos/> - </pos> -</c_fpobel> -EOD; - -$xml = simplexml_load_string ($xml_str) ; - -$val = 1; - -var_dump($val); -$obj->pos["act_idx"] = $val; -var_dump($val) ; - -echo "Done\n"; -?> ---EXPECT-- -int(1) -int(1) -Done diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt deleted file mode 100755 index e04f9577f1..0000000000 --- a/ext/simplexml/tests/bug37565.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Bug #37565 Using reflection::export with simplexml causing a crash ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -function my_error_handler($errno, $errstr, $errfile, $errline) { - echo "Error: $errstr\n"; -} - -set_error_handler('my_error_handler'); - -class Setting extends ReflectionObject -{ -} - -Reflection::export(simplexml_load_string('<test/>', 'Setting')); - -Reflection::export(simplexml_load_file('data:,<test/>', 'Setting')); - -?> -===DONE=== ---EXPECTF-- -Error: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given -Error: Argument 1 passed to Reflection::export() must implement interface Reflector, null given -Error: Reflection::export() expects parameter 1 to be Reflector, null given -Error: simplexml_load_file() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given -Error: Argument 1 passed to Reflection::export() must implement interface Reflector, null given -Error: Reflection::export() expects parameter 1 to be Reflector, null given -===DONE=== diff --git a/ext/simplexml/tests/bug38347.phpt b/ext/simplexml/tests/bug38347.phpt deleted file mode 100644 index c25fccea24..0000000000 --- a/ext/simplexml/tests/bug38347.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #38347 (Segmentation fault when using foreach with an unknown/empty SimpleXMLElement) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -function iterate($xml) -{ - print_r($xml); - foreach ($xml->item as $item) { - echo "This code will crash!"; - } -} - -$xmlstr = "<xml><item>Item 1</item><item>Item 2</item></xml>"; -$xml = simplexml_load_string($xmlstr); -iterate($xml->unknown); - -echo "Done\n"; -?> ---EXPECTF-- -SimpleXMLElement Object -( -) - -Warning: iterate(): Node no longer exists in %s on line %d -Done diff --git a/ext/simplexml/tests/bug38354.phpt b/ext/simplexml/tests/bug38354.phpt deleted file mode 100644 index d2fcde11c2..0000000000 --- a/ext/simplexml/tests/bug38354.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Bug #38354 (Unwanted reformatting of XML when using AsXML) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml = simplexml_load_string( -'<code> - <a href="javascript:alert(\'1\');"><strong>Item Two</strong></a> -</code>' -); - -foreach ($xml->xpath("//*") as $element) { - var_dump($element->asXML()); -} - -echo "Done\n"; -?> ---EXPECTF-- -string(101) "<?xml version="1.0"?> -<code> - <a href="javascript:alert('1');"><strong>Item Two</strong></a> -</code> -" -string(62) "<a href="javascript:alert('1');"><strong>Item Two</strong></a>" -string(25) "<strong>Item Two</strong>" -Done diff --git a/ext/simplexml/tests/bug38424.phpt b/ext/simplexml/tests/bug38424.phpt deleted file mode 100644 index baab45fe54..0000000000 --- a/ext/simplexml/tests/bug38424.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Bug #38424 (Different attribute assignment if new or exists) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml = simplexml_load_string('<xml></xml>'); - -$str = "abc & def" ; - -$xml["a1"] = "" ; -$xml["a1"] = htmlspecialchars($str,ENT_NOQUOTES) ; - -$xml["a2"] = htmlspecialchars($str,ENT_NOQUOTES) ; - -$xml["a3"] = "" ; -$xml["a3"] = $str ; - -$xml["a4"] = $str ; - -echo $xml->asXML(); -?> ---EXPECT-- -<?xml version="1.0"?> -<xml a1="abc &amp; def" a2="abc &amp; def" a3="abc & def" a4="abc & def"/> diff --git a/ext/simplexml/tests/profile01.phpt b/ext/simplexml/tests/profile01.phpt deleted file mode 100644 index 91b9544f66..0000000000 --- a/ext/simplexml/tests/profile01.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing a simple node ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$root = simplexml_load_string('<?xml version="1.0"?> -<root> - <child>Hello</child> -</root> -'); - -echo $root->child; -echo "\n---Done---\n"; -?> ---EXPECT-- -Hello ----Done--- diff --git a/ext/simplexml/tests/profile02.phpt b/ext/simplexml/tests/profile02.phpt deleted file mode 100644 index 14b5bb86b2..0000000000 --- a/ext/simplexml/tests/profile02.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing an array of subnodes ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$root = simplexml_load_string('<?xml version="1.0"?> -<root> - <child>Hello</child> - <child>World</child> -</root> -'); - -foreach ($root->child as $child) { - echo "$child "; -} -echo "\n---Done---\n"; -?> ---EXPECT-- -Hello World ----Done--- diff --git a/ext/simplexml/tests/profile03.phpt b/ext/simplexml/tests/profile03.phpt deleted file mode 100644 index 14f1c5fe88..0000000000 --- a/ext/simplexml/tests/profile03.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing an attribute ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$root = simplexml_load_string('<?xml version="1.0"?> -<root> - <child attribute="Sample" /> -</root> -'); - -echo $root->child['attribute']; -echo "\n---Done---\n"; -?> ---EXPECT-- -Sample ----Done--- diff --git a/ext/simplexml/tests/profile04.phpt b/ext/simplexml/tests/profile04.phpt deleted file mode 100644 index 27714e9927..0000000000 --- a/ext/simplexml/tests/profile04.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing a namespaced element ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <reserved:child>Hello</reserved:child> -</root> -'); - -echo $root->children('reserved-ns')->child; -echo "\n---Done---\n"; -?> ---EXPECT-- -Hello ----Done--- diff --git a/ext/simplexml/tests/profile05.phpt b/ext/simplexml/tests/profile05.phpt deleted file mode 100644 index f69622118a..0000000000 --- a/ext/simplexml/tests/profile05.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing an aliased namespaced element ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <reserved:child>Hello</reserved:child> -</root> -'); - -echo $root->children('reserved')->child; -echo "\n---Done---\n"; -?> ---EXPECT-- ----Done--- diff --git a/ext/simplexml/tests/profile06.phpt b/ext/simplexml/tests/profile06.phpt deleted file mode 100644 index e519fa9d64..0000000000 --- a/ext/simplexml/tests/profile06.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing a namespaced attribute ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <child reserved:attribute="Sample" /> -</root> -'); - -$attr = $root->child->attributes('reserved-ns'); -echo $attr['attribute']; -echo "\n---Done---\n"; -?> ---EXPECT-- -Sample ----Done--- diff --git a/ext/simplexml/tests/profile07.phpt b/ext/simplexml/tests/profile07.phpt deleted file mode 100644 index c8a4269274..0000000000 --- a/ext/simplexml/tests/profile07.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing an aliased namespaced attribute ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <child reserved:attribute="Sample" /> -</root> -'); - -$rsattr = $root->child->attributes('reserved'); -$myattr = $root->child->attributes('reserved-ns'); - -echo $rsattr['attribute']; -echo $myattr['attribute']; -echo "\n---Done---\n"; -?> ---EXPECT-- -Sample ----Done--- diff --git a/ext/simplexml/tests/profile08.phpt b/ext/simplexml/tests/profile08.phpt deleted file mode 100644 index bbb69b75a8..0000000000 --- a/ext/simplexml/tests/profile08.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing a namespaced attribute without a namespace ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <child reserved:attribute="Sample" /> -</root> -'); - -echo $root->child['attribute']; -echo "\n---Done---\n"; -?> ---EXPECT-- ----Done--- diff --git a/ext/simplexml/tests/profile09.phpt b/ext/simplexml/tests/profile09.phpt deleted file mode 100644 index 714572df1e..0000000000 --- a/ext/simplexml/tests/profile09.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing a namespaced element without a namespace ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns"> - <reserved:child>Hello</reserved:child> -</root> -'); - -echo $root->child; -echo "\n---Done---\n"; -?> ---EXPECT-- - ----Done--- diff --git a/ext/simplexml/tests/profile10.phpt b/ext/simplexml/tests/profile10.phpt deleted file mode 100644 index 6ef7456c51..0000000000 --- a/ext/simplexml/tests/profile10.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing two attributes with the same name, but different namespaces ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns" xmlns:special="special-ns"> - <child reserved:attribute="Sample" special:attribute="Test" /> -</root> -'); - -$rsattr = $root->child->attributes('reserved-ns'); -$spattr = $root->child->attributes('special-ns'); - -echo $rsattr['attribute']; -echo "\n"; -echo $spattr['attribute']; -echo "\n---Done---\n"; -?> ---EXPECT-- -Sample -Test ----Done--- diff --git a/ext/simplexml/tests/profile11.phpt b/ext/simplexml/tests/profile11.phpt deleted file mode 100644 index 54c31bf710..0000000000 --- a/ext/simplexml/tests/profile11.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing two elements with the same name, but different namespaces ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -error_reporting(E_ALL & ~E_NOTICE); -$root = simplexml_load_string('<?xml version="1.0"?> -<root xmlns:reserved="reserved-ns" xmlns:special="special-ns"> - <reserved:child>Hello</reserved:child> - <special:child>World</special:child> -</root> -'); - -var_dump($root->children('reserved-ns')->child); -var_dump($root->children('special-ns')->child); -var_dump((string)$root->children('reserved-ns')->child); -var_dump((string)$root->children('special-ns')->child); -var_dump($root->child); -?> -===DONE=== ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - [0]=> - string(5) "Hello" -} -object(SimpleXMLElement)#%d (1) { - [0]=> - string(5) "World" -} -string(5) "Hello" -string(5) "World" -object(SimpleXMLElement)#%d (0) { -} -===DONE=== diff --git a/ext/simplexml/tests/profile12.phpt b/ext/simplexml/tests/profile12.phpt deleted file mode 100755 index 51a0d35531..0000000000 --- a/ext/simplexml/tests/profile12.phpt +++ /dev/null @@ -1,74 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing namespaced root and non namespaced children ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version="1.0" encoding="utf-8"?> -<soap:Envelope -xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -> -<soap:Body> -<businessList foo="bar"> -<businessInfo businessKey="bla"/> -</businessList> -</soap:Body> -</soap:Envelope> -EOF; - -$sxe = simplexml_load_string($xml); -$nsl = $sxe->getNamespaces(); -var_dump($nsl); - -$sxe = simplexml_load_string($xml, NULL, 0, $nsl['soap']); -var_dump($sxe->Body); -var_dump($sxe->Body->children('')); -var_dump($sxe->Body->children('')->businessList); - -?> -===DONE=== ---EXPECTF-- -array(1) { - ["soap"]=> - string(41) "http://schemas.xmlsoap.org/soap/envelope/" -} -object(SimpleXMLElement)#%s (0) { -} -object(SimpleXMLElement)#%s (1) { - ["businessList"]=> - object(SimpleXMLElement)#%s (2) { - ["@attributes"]=> - array(1) { - ["foo"]=> - string(3) "bar" - } - ["businessInfo"]=> - object(SimpleXMLElement)#%s (1) { - ["@attributes"]=> - array(1) { - ["businessKey"]=> - string(3) "bla" - } - } - } -} -object(SimpleXMLElement)#%s (2) { - ["@attributes"]=> - array(1) { - ["foo"]=> - string(3) "bar" - } - ["businessInfo"]=> - object(SimpleXMLElement)#%s (1) { - ["@attributes"]=> - array(1) { - ["businessKey"]=> - string(3) "bla" - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/profile13.phpt b/ext/simplexml/tests/profile13.phpt deleted file mode 100755 index 2ae89e7449..0000000000 --- a/ext/simplexml/tests/profile13.phpt +++ /dev/null @@ -1,75 +0,0 @@ ---TEST-- -SimpleXML [profile]: Accessing by namespace prefix ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -$xml =<<<EOF -<?xml version="1.0" encoding="utf-8"?> -<soap:Envelope -xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -> -<soap:Body> -<businessList foo="bar"> -<businessInfo businessKey="bla"/> -</businessList> -</soap:Body> -</soap:Envelope> -EOF; - -$sxe = simplexml_load_string($xml); -var_dump($sxe->children('soap', 1)); - -$sxe = simplexml_load_string($xml, NULL, 0, 'soap', 1); -var_dump($sxe->Body); -var_dump($sxe->Body->children('')); -var_dump($sxe->Body->children('')->businessList); - -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -object(SimpleXMLElement)#%d (1) { - ["Body"]=> - object(SimpleXMLElement)#%d (0) { - } -} -object(SimpleXMLElement)#%d (0) { -} -object(SimpleXMLElement)#%d (1) { - ["businessList"]=> - object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["foo"]=> - string(3) "bar" - } - ["businessInfo"]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["businessKey"]=> - string(3) "bla" - } - } - } -} -object(SimpleXMLElement)#%d (2) { - ["@attributes"]=> - array(1) { - ["foo"]=> - string(3) "bar" - } - ["businessInfo"]=> - object(SimpleXMLElement)#%d (1) { - ["@attributes"]=> - array(1) { - ["businessKey"]=> - string(3) "bla" - } - } -} -===DONE=== diff --git a/ext/simplexml/tests/simplexml_import_dom.phpt b/ext/simplexml/tests/simplexml_import_dom.phpt deleted file mode 100755 index e108e0554d..0000000000 --- a/ext/simplexml/tests/simplexml_import_dom.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -SimpleXML [interop]: simplexml_import_dom ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) die("skip"); ?> -<?php if (!extension_loaded("dom")) die("skip dom extension not loaded"); ?> ---FILE-- -<?php -$dom = new domDocument; -$dom->load(dirname(__FILE__)."/book.xml"); -if(!$dom) { - echo "Error while parsing the document\n"; - exit; -} -$s = simplexml_import_dom($dom); -$books = $s->book; -foreach ($books as $book) { - echo "{$book->title} was written by {$book->author}\n"; -} -?> ---EXPECT-- -The Grapes of Wrath was written by John Steinbeck -The Pearl was written by John Steinbeck diff --git a/ext/simplexml/tests/sxe.dtd b/ext/simplexml/tests/sxe.dtd deleted file mode 100755 index b75a7922b0..0000000000 --- a/ext/simplexml/tests/sxe.dtd +++ /dev/null @@ -1,34 +0,0 @@ -<?xml encoding='US-ASCII'?>
-
-<!ELEMENT sxe (elem1+, elem11, elem22*)>
-<!ATTLIST sxe id CDATA #implied>
-
-<!ELEMENT elem1 elem2*>
-<!ATTLIST elem1 attr1 CDATA #required
- attr2 CDATA "default>
-
-<!ELEMENT elem2 elem3*>
-<!ATTLIST elem2 att25 CDATA #implied
- att42 CDATA #implied>
-
-<!ELEMENT elem3 elem4*>
-<!ATTLIST elem3>
-
-<!ELEMENT elem4 EMPTY>
-<!ATTLIST elem4>
-
-<!ELEMENT elem11 elem111*>
-<!ATTLIST elem11>
-
-<!ELEMNET elem111 elem1111*>
-<!ATTLIST elem111>
-
-<!ELEMENT elem1111 EMPTY>
-<!ATTLIST elem1111>
-
-<!ELEMENT elem22 elem222*>
-<!ATTLIST elem22 attr22 CDATA #implied>
-
-<!ELEMENT elem222 EMPTY>
-<!ATTLIST elem222>
-
diff --git a/ext/simplexml/tests/sxe.ent b/ext/simplexml/tests/sxe.ent deleted file mode 100755 index 8f86465c2a..0000000000 --- a/ext/simplexml/tests/sxe.ent +++ /dev/null @@ -1 +0,0 @@ -<!ENTITY included-entity "This is text included from an entity"> diff --git a/ext/simplexml/tests/sxe.xml b/ext/simplexml/tests/sxe.xml deleted file mode 100755 index 909b4e652c..0000000000 --- a/ext/simplexml/tests/sxe.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version='1.0'?> -<!DOCTYPE sxe SYSTEM "notfound.dtd" [ -<!ENTITY % incent SYSTEM "sxe.ent"> -%incent; -]> -<sxe id="elem1"> - <elem1 attr1='first'> - <!-- comment --> - <elem2> - <elem3> - <elem4> - <?test processing instruction ?> - </elem4> - </elem3> - </elem2> - </elem1> -</sxe>
\ No newline at end of file |