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
35
35
EOD ;
36
36
37
37
$ expected = [
38
- " show " => [
38
+ ' show ' => [
39
39
[
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 ' ,
45
48
],
46
- "@attributes " => ["name " => "Family Guy " ],
47
49
],
48
50
[
49
51
'pet ' => [
50
- "@content " => 'Klaus ' ,
51
- "@attributes " => ["type " => "fish " ],
52
+ '@content ' => 'Klaus ' ,
53
+ '@attributes ' => [
54
+ 'type ' => 'fish ' ,
55
+ ],
52
56
],
53
57
'alien ' => [
54
58
'persona ' => [
55
59
'Roger Smith ' ,
56
60
'Sidney Huffman ' ,
57
61
],
58
- "@attributes " => ["nick " => "The Decider " ],
62
+ '@attributes ' => [
63
+ 'nick ' => 'The Decider ' ,
64
+ ],
65
+ ],
66
+ '@attributes ' => [
67
+ 'name ' => 'American Dad! ' ,
59
68
],
60
- "@attributes " => ["name " => "American Dad! " ],
61
69
],
62
70
[
63
- " empty " => "" ,
64
- " foo " => [
65
- " @attributes " => [
66
- " empty " => "" ,
71
+ ' empty ' => '' ,
72
+ ' foo ' => [
73
+ ' @attributes ' => [
74
+ ' empty ' => '' ,
67
75
],
68
76
],
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 ' => '' ,
74
82
],
75
83
],
76
84
],
77
- "@attributes " => ["type " => "cartoon " ],
78
- "@root " => 'tv ' ,
85
+ '@attributes ' => [
86
+ 'type ' => 'cartoon ' ,
87
+ ],
88
+ '@root ' => 'tv ' ,
79
89
];
80
90
81
91
$ result = \Baraja \XmlToPhp \Convertor::covertToArray ($ xmlstr );
You can’t perform that action at this time.
0 commit comments