Browse Source

- Fix unicode expectations

migration/RELEASE_1_0_0
Marcus Boerger 20 years ago
parent
commit
82aa412cf8
  1. 183
      ext/simplexml/tests/000.phpt
  2. 32
      ext/simplexml/tests/001.phpt
  3. 32
      ext/simplexml/tests/002.phpt
  4. 37
      ext/simplexml/tests/003.phpt
  5. 33
      ext/simplexml/tests/004.phpt
  6. 49
      ext/simplexml/tests/007.phpt
  7. 32
      ext/simplexml/tests/010.phpt
  8. 33
      ext/simplexml/tests/022.phpt
  9. 13
      ext/simplexml/tests/023.phpt
  10. 142
      ext/simplexml/tests/024.phpt
  11. 14
      ext/simplexml/tests/profile11.phpt
  12. 32
      ext/spl/tests/sxe_001.phpt

183
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===

32
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===

32
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===

37
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===

33
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===

49
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===

32
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===

33
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===

13
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===

142
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===

14
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===

32
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===
Loading…
Cancel
Save