diff options
author | SVN Migration <svn@php.net> | 2004-01-25 12:03:25 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2004-01-25 12:03:25 +0000 |
commit | 22476b36ce621bdd115493bab84cbe706e422a7c (patch) | |
tree | 1124d1c5af68860a78c2252bb0dac63c9f18156e /ext/simplexml/tests | |
parent | eb7aca4ea896b09cb9afc2466a46f4720acc4a4e (diff) | |
download | php-git-php_ibase_before_split.tar.gz |
This commit was manufactured by cvs2svn to create tagphp_ibase_before_split
'php_ibase_before_split'.
Diffstat (limited to 'ext/simplexml/tests')
44 files changed, 0 insertions, 1722 deletions
diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt deleted file mode 100644 index 123c91d244..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 - -$sxe = simplexml_load_file(dirname(__FILE__).'/sxe.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 - ( - [elem4] => simplexml_element Object - ( - [test] => simplexml_element Object - ( - ) - - ) - - ) - - ) - - ) - -) ----Done--- diff --git a/ext/simplexml/tests/002.phpt b/ext/simplexml/tests/002.phpt deleted file mode 100644 index 009101adb0..0000000000 --- a/ext/simplexml/tests/002.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -SimpleXML and 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 = $sxe->__clone(); - -print_r($copy); - -echo "---Done---\n"; - -?> ---EXPECT-- -simplexml_element Object -( - [elem1] => simplexml_element Object - ( - [comment] => simplexml_element Object - ( - ) - - [elem2] => simplexml_element Object - ( - [elem3] => simplexml_element Object - ( - [elem4] => simplexml_element Object - ( - [test] => simplexml_element Object - ( - ) - - ) - - ) - - ) - - ) - -) ----Done--- diff --git a/ext/simplexml/tests/003.phpt b/ext/simplexml/tests/003.phpt deleted file mode 100755 index 0924fd044f..0000000000 --- a/ext/simplexml/tests/003.phpt +++ /dev/null @@ -1,69 +0,0 @@ ---TEST-- -SimpleXML and 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; - -$sxe = simplexml_load_string($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--- diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt deleted file mode 100755 index b82f66567c..0000000000 --- a/ext/simplexml/tests/004.phpt +++ /dev/null @@ -1,65 +0,0 @@ ---TEST-- -SimpleXML and 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 -); - -print_r($sxe); - -$elem1 = $sxe->elem1; -$elem2 = $elem1->elem2; -var_dump(trim((string)$elem2)); - -?> -===DONE=== ---EXPECT-- -simplexml_element Object -( - [elem1] => simplexml_element Object - ( - [comment] => simplexml_element Object - ( - ) - - [elem2] => simplexml_element Object - ( - [elem3] => simplexml_element Object - ( - [elem4] => simplexml_element Object - ( - [test] => simplexml_element Object - ( - ) - - ) - - ) - - ) - - ) - -) -string(11) "CDATA block" -===DONE=== diff --git a/ext/simplexml/tests/005.phpt b/ext/simplexml/tests/005.phpt deleted file mode 100755 index 237a5d2616..0000000000 --- a/ext/simplexml/tests/005.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -SimpleXML and 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 9e81f20dd9..0000000000 --- a/ext/simplexml/tests/006.phpt +++ /dev/null @@ -1,80 +0,0 @@ ---TEST-- -SimpleXML and 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($sxe->__clone() 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 5b44b63837..0000000000 --- a/ext/simplexml/tests/007.phpt +++ /dev/null @@ -1,92 +0,0 @@ ---TEST-- -SimpleXML and 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(simplexml_element)#%d (2) { - ["comment"]=> - object(simplexml_element)#%d (0) { - } - ["elem2"]=> - object(simplexml_element)#%d (1) { - ["elem3"]=> - object(simplexml_element)#%d (1) { - ["elem4"]=> - object(simplexml_element)#%d (1) { - ["test"]=> - object(simplexml_element)#%d (0) { - } - } - } - } -} -===Array=== -object(simplexml_element)#%d (1) { - [0]=> - string(5) "elem1" -} -object(simplexml_element)#%d (1) { - [0]=> - string(5) "first" -} -===Set=== -object(simplexml_element)#%d (1) { - [0]=> - string(8) "Changed1" -} -object(simplexml_element)#%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 68b6f39351..0000000000 --- a/ext/simplexml/tests/008.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -SimpleXML and 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(simplexml_element)#%d (1) { - ["test"]=> - object(simplexml_element)#%d (0) { - } - } -} -bool(false) diff --git a/ext/simplexml/tests/009.phpt b/ext/simplexml/tests/009.phpt deleted file mode 100755 index d4543f483e..0000000000 --- a/ext/simplexml/tests/009.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -SimpleXML and 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((string)$val)); -} -?> -===DONE=== ---EXPECT-- -string(5) "elem1" -string(17) "simplexml_element" -string(10) "Bla bla 1." -string(6) "elem11" -string(17) "simplexml_element" -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 20e2f89a26..0000000000 --- a/ext/simplexml/tests/010.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -SimpleXML: Simple Inheritance ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php - -class simplexml_inherited extends simplexml_element -{ -} - -$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, 'simplexml_inherited'); - -print_r($sxe); - -?> -===DONE=== ---EXPECT-- -simplexml_inherited Object -( - [elem1] => simplexml_inherited Object - ( - [comment] => simplexml_inherited Object - ( - ) - - [elem2] => simplexml_inherited Object - ( - [elem3] => simplexml_inherited Object - ( - [elem4] => simplexml_inherited Object - ( - [test] => simplexml_inherited Object - ( - ) - - ) - - ) - - ) - - ) - -) -===DONE=== diff --git a/ext/simplexml/tests/011.phpt b/ext/simplexml/tests/011.phpt deleted file mode 100755 index f48c9f1eec..0000000000 --- a/ext/simplexml/tests/011.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -SimpleXML and 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 79c01107fe..0000000000 --- a/ext/simplexml/tests/012.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -SimpleXML and 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"; - -?> -===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 fbd80b0c44..0000000000 --- a/ext/simplexml/tests/013.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -SimpleXML and 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 4c559d8a15..0000000000 --- a/ext/simplexml/tests/014.phpt +++ /dev/null @@ -1,57 +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(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(simplexml_element)#%d (1) { - [0]=> - string(3) "XXX" -} -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} - -Fatal error: Unsupported operand types in %s014.php on line %d diff --git a/ext/simplexml/tests/014a.phpt b/ext/simplexml/tests/014a.phpt deleted file mode 100755 index 5f2e15a74f..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(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(simplexml_element)#%d (1) { - [0]=> - string(3) "XXX" -} -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} - -Fatal error: Unsupported operand types in %s014.php on line %d diff --git a/ext/simplexml/tests/014b.phpt b/ext/simplexml/tests/014b.phpt deleted file mode 100755 index 2452a1468c..0000000000 --- a/ext/simplexml/tests/014b.phpt +++ /dev/null @@ -1,56 +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(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -NULL -object(simplexml_element)#%d (1) { - [0]=> - string(3) "XXX" -} -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} ----Unset:--- ----Unset?--- -NULL -bool(false) ----Unsupported--- -object(simplexml_element)#%d (1) { - [0]=> - string(2) "30" -} - -Fatal error: Unsupported operand types in %s014.php on line %d diff --git a/ext/simplexml/tests/015.phpt b/ext/simplexml/tests/015.phpt deleted file mode 100644 index 0865b69f61..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(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -object(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -object(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -object(simplexml_element)#%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 65870408ef..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(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -object(simplexml_element)#%d (1) { - [0]=> - string(6) "JoeFoo" -} -object(simplexml_element)#%d (1) { - [0]=> - string(9) "JoeFooBar" -} ----[0]--- -object(simplexml_element)#%d (1) { - [0]=> - string(3) "Joe" -} -object(simplexml_element)#%d (1) { - [0]=> - string(6) "JoeFoo" -} -object(simplexml_element)#%d (1) { - [0]=> - string(9) "JoeFooBar" -} -===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 09f0569d7a..0000000000 --- a/ext/simplexml/tests/019.phpt +++ /dev/null @@ -1,80 +0,0 @@ ---TEST-- -SimpleXML and 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($sxe->children()->__clone() 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/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 dffb7476b6..0000000000 --- a/ext/simplexml/tests/bug27010.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -#27010: segfault and node text not displayed when returned from children() ---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/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 e68e6bd510..0000000000 --- a/ext/simplexml/tests/profile11.phpt +++ /dev/null @@ -1,26 +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> -'); - -echo $root->children('reserved-ns')->child; -echo "\n"; -echo $root->children('special-ns')->child; -foreach ($root->child as $child) { - echo "$child\n"; -} -echo "\n---Done---\n"; -?> ---EXPECT-- -Hello -World ----Done--- diff --git a/ext/simplexml/tests/simplexml_import_dom.phpt b/ext/simplexml/tests/simplexml_import_dom.phpt deleted file mode 100755 index c66ba8f087..0000000000 --- a/ext/simplexml/tests/simplexml_import_dom.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Interop: simplexml_import_dom ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> -<?php if (!extension_loaded("dom")) print "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 8a8dde4308..0000000000 --- a/ext/simplexml/tests/sxe.dtd +++ /dev/null @@ -1,21 +0,0 @@ -<?xml encoding='US-ASCII'?>
-
-<!ELEMENT sxe elem1, elem 11>
-<!ATTLIST sxe id CDATA #implied>
-
-<!ELEMENT elem1 elem2>
-<!ATTLIST elem1 attr1 CDATA #required
- attr2 CDATA "default>
-
-<!ELEMENT elem2 elem3>
-<!ATTLIST elem2>
-
-<!ELEMENT elem3 elem4>
-<!ATTLIST elem3>
-
-<!ELEMENT elem4 EMPTY>
-<!ATTLIST elem4>
-
-<!ELEMENT elem11 EMPTY>
-<!ATTLIST elem11>
-
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 |