File tree Expand file tree Collapse file tree 1 file changed +32
-22
lines changed Expand file tree Collapse file tree 1 file changed +32
-22
lines changed Original file line number Diff line number Diff line change @@ -35,47 +35,57 @@ $xmlstr = <<<EOD
3535EOD ;
3636
3737$ expected = [
38- " show " => [
38+ ' show ' => [
3939 [
40- "dog " => 'Brian ' ,
41- "kid " => [
42- "Chris " ,
43- "Meg " ,
44- "<em>Stewie</em> " ,
40+ 'dog ' => 'Brian ' ,
41+ 'kid ' => [
42+ 'Chris ' ,
43+ 'Meg ' ,
44+ '<em>Stewie</em> ' ,
45+ ],
46+ '@attributes ' => [
47+ 'name ' => 'Family Guy ' ,
4548 ],
46- "@attributes " => ["name " => "Family Guy " ],
4749 ],
4850 [
4951 'pet ' => [
50- "@content " => 'Klaus ' ,
51- "@attributes " => ["type " => "fish " ],
52+ '@content ' => 'Klaus ' ,
53+ '@attributes ' => [
54+ 'type ' => 'fish ' ,
55+ ],
5256 ],
5357 'alien ' => [
5458 'persona ' => [
5559 'Roger Smith ' ,
5660 'Sidney Huffman ' ,
5761 ],
58- "@attributes " => ["nick " => "The Decider " ],
62+ '@attributes ' => [
63+ 'nick ' => 'The Decider ' ,
64+ ],
65+ ],
66+ '@attributes ' => [
67+ 'name ' => 'American Dad! ' ,
5968 ],
60- "@attributes " => ["name " => "American Dad! " ],
6169 ],
6270 [
63- " empty " => "" ,
64- " foo " => [
65- " @attributes " => [
66- " empty " => "" ,
71+ ' empty ' => '' ,
72+ ' foo ' => [
73+ ' @attributes ' => [
74+ ' empty ' => '' ,
6775 ],
6876 ],
69- " zero " => " 0 " ,
70- " @attributes " => [
71- " name " => " Edge Cases " ,
72- " zero " => " 0 " ,
73- " empty " => "" ,
77+ ' zero ' => ' 0 ' ,
78+ ' @attributes ' => [
79+ ' name ' => ' Edge Cases ' ,
80+ ' zero ' => ' 0 ' ,
81+ ' empty ' => '' ,
7482 ],
7583 ],
7684 ],
77- "@attributes " => ["type " => "cartoon " ],
78- "@root " => 'tv ' ,
85+ '@attributes ' => [
86+ 'type ' => 'cartoon ' ,
87+ ],
88+ '@root ' => 'tv ' ,
7989];
8090
8191$ result = \Baraja \XmlToPhp \Convertor::covertToArray ($ xmlstr );
You can’t perform that action at this time.
0 commit comments