From 82aa412cf888ab961ba2be8ad3c5bc7725dd7444 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 30 Oct 2005 14:00:45 +0000 Subject: [PATCH] - Fix unicode expectations --- ext/simplexml/tests/000.phpt | 183 +++++++++++++++++++++++++++++ ext/simplexml/tests/001.phpt | 32 +++++ ext/simplexml/tests/002.phpt | 32 +++++ ext/simplexml/tests/003.phpt | 37 ++++++ ext/simplexml/tests/004.phpt | 33 ++++++ ext/simplexml/tests/007.phpt | 49 ++++++++ ext/simplexml/tests/010.phpt | 32 +++++ ext/simplexml/tests/022.phpt | 33 ++++++ ext/simplexml/tests/023.phpt | 13 ++ ext/simplexml/tests/024.phpt | 142 ++++++++++++++++++++++ ext/simplexml/tests/profile11.phpt | 14 +++ ext/spl/tests/sxe_001.phpt | 32 +++++ 12 files changed, 632 insertions(+) diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt index 0499bcd541..b83b62af70 100755 --- a/ext/simplexml/tests/000.phpt +++ b/ext/simplexml/tests/000.phpt @@ -218,3 +218,186 @@ NULL bool(false) NULL ===DONE=== +--UEXPECTF-- +===sxe +bool(true) +object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(3) "123" + } + [u"elem1"]=> + array(2) { + [0]=> + string(36) "There is some text.Here is some more" + [1]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(2) { + [u"attr1"]=> + string(2) "11" + [u"attr2"]=> + string(2) "12" + } + } + } + [u"elem11"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem111"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } +} +===sxe->elem1 +bool(true) +object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(2) { + [u"attr1"]=> + string(5) "first" + [u"attr2"]=> + string(6) "second" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(2) { + [u"att25"]=> + string(2) "25" + [u"att42"]=> + string(2) "42" + } + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } +} +===sxe->elem1[0] +bool(true) +object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(2) { + [u"attr1"]=> + string(5) "first" + [u"attr2"]=> + string(6) "second" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(2) { + [u"att25"]=> + string(2) "25" + [u"att42"]=> + string(2) "42" + } + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } +} +===sxe->elem1[0]->elem2 +bool(true) +object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(2) { + [u"att25"]=> + string(2) "25" + [u"att42"]=> + string(2) "42" + } + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } +} +===sxe->elem1[0]->elem2->bla +bool(false) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem1[0]["attr1"] +bool(false) +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(5) "first" +} +===sxe->elem1[0]->attr1 +bool(false) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem1[1] +bool(true) +object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(2) { + [u"attr1"]=> + string(2) "11" + [u"attr2"]=> + string(2) "12" + } +} +===sxe->elem1[2] +bool(false) +NULL +===sxe->elem11 +bool(true) +object(SimpleXMLElement)#%d (1) { + [u"elem111"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } + } +} +===sxe->elem11->elem111 +bool(true) +object(SimpleXMLElement)#%d (1) { + [u"elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } +} +===sxe->elem11->elem111->elem1111 +bool(true) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem22 +bool(false) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem22->elem222 +bool(false) +NULL +===sxe->elem22->attr22 +bool(false) +NULL +===sxe->elem22["attr22"] +bool(false) +NULL +===DONE=== diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt index 0be77710e5..5dc9abfd6f 100644 --- a/ext/simplexml/tests/001.phpt +++ b/ext/simplexml/tests/001.phpt @@ -41,3 +41,35 @@ object(SimpleXMLElement)#%d (2) { } } ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/002.phpt b/ext/simplexml/tests/002.phpt index 4f1f6b6224..8632207d24 100644 --- a/ext/simplexml/tests/002.phpt +++ b/ext/simplexml/tests/002.phpt @@ -62,3 +62,35 @@ object(SimpleXMLElement)#%d (2) { } } ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/003.phpt b/ext/simplexml/tests/003.phpt index 105f616d60..978768a366 100755 --- a/ext/simplexml/tests/003.phpt +++ b/ext/simplexml/tests/003.phpt @@ -67,3 +67,40 @@ object(SimpleXMLElement)#%d (2) { } } ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem3"]=> + object(SimpleXMLElement)#%d (2) { + [u"included-entity"]=> + object(SimpleXMLElement)#%d (1) { + [u"included-entity"]=> + string(36) "This is text included from an entity" + } + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt index 21cb5469e0..c2f462be6b 100755 --- a/ext/simplexml/tests/004.phpt +++ b/ext/simplexml/tests/004.phpt @@ -66,3 +66,36 @@ object(SimpleXMLElement)#%d (2) { } string(11) "CDATA block" ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +unicode(11) "CDATA block" +===DONE=== diff --git a/ext/simplexml/tests/007.phpt b/ext/simplexml/tests/007.phpt index 51d7a847f7..5a7ba29deb 100755 --- a/ext/simplexml/tests/007.phpt +++ b/ext/simplexml/tests/007.phpt @@ -95,3 +95,52 @@ NULL int(4) int(4) ===Done=== +--UEXPECTF-- +===Property=== +object(SimpleXMLElement)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLElement)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem3"]=> + object(SimpleXMLElement)#%d (1) { + [u"elem4"]=> + object(SimpleXMLElement)#%d (1) { + [u"test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } +} +===Array=== +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(5) "elem1" +} +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(5) "first" +} +===Set=== +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(8) "Changed1" +} +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(2) "12" +} +===Unset=== +NULL +NULL +===Misc.=== +int(4) +int(4) +===Done=== diff --git a/ext/simplexml/tests/010.phpt b/ext/simplexml/tests/010.phpt index 267780905b..a71618ba01 100644 --- a/ext/simplexml/tests/010.phpt +++ b/ext/simplexml/tests/010.phpt @@ -62,3 +62,35 @@ object(simplexml_inherited)#%d (2) { } } ===DONE=== +--UEXPECTF-- +object(simplexml_inherited)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(simplexml_inherited)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(simplexml_inherited)#%d (0) { + } + [u"elem2"]=> + object(simplexml_inherited)#%d (1) { + [u"elem3"]=> + object(simplexml_inherited)#%d (1) { + [u"elem4"]=> + object(simplexml_inherited)#%d (1) { + [u"test"]=> + object(simplexml_inherited)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/022.phpt b/ext/simplexml/tests/022.phpt index 2af4a1dd28..36cc0145b3 100755 --- a/ext/simplexml/tests/022.phpt +++ b/ext/simplexml/tests/022.phpt @@ -60,3 +60,36 @@ object(SimpleXMLElement)#%d (1) { string(11) "slide_*.xml" } ===DONE=== +--UEXPECTF-- +===CONTENT=== +object(SimpleXMLElement)#%d (1) { + [u"file"]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"glob"]=> + string(11) "slide_*.xml" + } + } +} +===FILE=== +object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"glob"]=> + string(11) "slide_*.xml" + } +} +===FOREACH=== +object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"glob"]=> + string(11) "slide_*.xml" + } +} +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(11) "slide_*.xml" +} +===DONE=== diff --git a/ext/simplexml/tests/023.phpt b/ext/simplexml/tests/023.phpt index 515a1460c9..c838ea7681 100755 --- a/ext/simplexml/tests/023.phpt +++ b/ext/simplexml/tests/023.phpt @@ -34,3 +34,16 @@ object(SimpleXMLElement)#%d (1) { string(%d) "foo%sbar%sbaz" } ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr"]=> + string(13) "foo bar baz" + } +} +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(%d) "foo%sbar%sbaz" +} +===DONE=== diff --git a/ext/simplexml/tests/024.phpt b/ext/simplexml/tests/024.phpt index 9f31fd5e93..a136cfb9cc 100755 --- a/ext/simplexml/tests/024.phpt +++ b/ext/simplexml/tests/024.phpt @@ -173,3 +173,145 @@ array(1) { } } ===DONE=== +--UEXPECTF-- +===elem/@attr2=== +array(3) { + [0]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "12" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "22" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "32" + } + } +} +===//@attr2=== +array(3) { + [0]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "12" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "22" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "32" + } + } +} +===//@*=== +array(9) { + [0]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(2) "11" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "12" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr3"]=> + string(2) "13" + } + } + [3]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(2) "21" + } + } + [4]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "22" + } + } + [5]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr3"]=> + string(2) "23" + } + } + [6]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(2) "31" + } + } + [7]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "32" + } + } + [8]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr3"]=> + string(2) "33" + } + } +} +===elem[2]/@attr2=== +array(1) { + [0]=> + object(SimpleXMLElement)#%d (1) { + [u"@attributes"]=> + array(1) { + [u"attr2"]=> + string(2) "22" + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/profile11.phpt b/ext/simplexml/tests/profile11.phpt index 54c31bf710..1520738b76 100644 --- a/ext/simplexml/tests/profile11.phpt +++ b/ext/simplexml/tests/profile11.phpt @@ -33,3 +33,17 @@ string(5) "World" object(SimpleXMLElement)#%d (0) { } ===DONE=== +--UEXPECTF-- +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(5) "Hello" +} +object(SimpleXMLElement)#%d (1) { + [0]=> + unicode(5) "World" +} +string(5) "Hello" +string(5) "World" +object(SimpleXMLElement)#%d (0) { +} +===DONE=== diff --git a/ext/spl/tests/sxe_001.phpt b/ext/spl/tests/sxe_001.phpt index c6e6b41d0c..11d8eeee23 100755 --- a/ext/spl/tests/sxe_001.phpt +++ b/ext/spl/tests/sxe_001.phpt @@ -62,3 +62,35 @@ object(SimpleXMLIterator)#%d (2) { } } ===DONE=== +--UEXPECTF-- +object(SimpleXMLIterator)#%d (2) { + [u"@attributes"]=> + array(1) { + [u"id"]=> + string(5) "elem1" + } + [u"elem1"]=> + object(SimpleXMLIterator)#%d (3) { + [u"@attributes"]=> + array(1) { + [u"attr1"]=> + string(5) "first" + } + [u"comment"]=> + object(SimpleXMLIterator)#%d (0) { + } + [u"elem2"]=> + object(SimpleXMLIterator)#%d (1) { + [u"elem3"]=> + object(SimpleXMLIterator)#%d (1) { + [u"elem4"]=> + object(SimpleXMLIterator)#%d (1) { + [u"test"]=> + object(SimpleXMLIterator)#%d (0) { + } + } + } + } + } +} +===DONE=== -- 2.40.0