From b766beaac9403457d7d4541770f663facb51dab5 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 18 Dec 2003 13:35:39 +0000 Subject: [PATCH] Update tests to see where they fail now exactly --- ext/simplexml/tests/014.phpt | 9 +++++++-- ext/simplexml/tests/016.phpt | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ext/simplexml/tests/014.phpt b/ext/simplexml/tests/014.phpt index b3d17af6f3..b04003fa24 100644 --- a/ext/simplexml/tests/014.phpt +++ b/ext/simplexml/tests/014.phpt @@ -14,13 +14,16 @@ EOF; $people = simplexml_load_string($xml); var_dump($people->person[0]['name']); var_dump($people->person[0]['age']); -$people->person[0]['name'] = "XXX"; -$people->person[0]['age'] = 30; +$person = $people->person[0]; +$person['name'] = "XXX"; var_dump($people->person[0]['name']); +$people->person[0]['age'] = 30; var_dump($people->person[0]['age']); $people->person[0]['age'] += 5; 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 "---Done---\n"; @@ -31,6 +34,8 @@ NULL string(3) "XXX" string(2) "30" string(2) "35" +---Unset:--- +---Unset?--- NULL bool(false) ---Done--- diff --git a/ext/simplexml/tests/016.phpt b/ext/simplexml/tests/016.phpt index 9c402ad233..a46c33571b 100644 --- a/ext/simplexml/tests/016.phpt +++ b/ext/simplexml/tests/016.phpt @@ -12,15 +12,28 @@ EOF; $people = simplexml_load_string($xml); var_dump($people->person['name']); -var_dump($people->person[0]['name']); -$people->person[0]['name'] .= "ZZZ"; +$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']); + echo "---Done---\n"; ?> --EXPECT-- string(3) "Joe" +string(3) "JoeFoo" +string(3) "JoeFooBar" +---[0]--- string(3) "Joe" -string(3) "JoeZZZ" -string(3) "JoeZZZ" +string(3) "JoeFoo" +string(3) "JoeFooBar" ---Done--- -- 2.40.0