@@ -71,7 +71,7 @@ public function testParseIsCalledIssetHrefVariables(): void
71
71
{
72
72
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
73
73
74
- $ json = '{"attributes":{"href":"something", "hrefVariables":{"hello":"world"}}, "content":[]} ' ;
74
+ $ json = '{"attributes":{"href":"something", "hrefVariables":{"content": [{"element": "member", " hello":"world"}] }}, "content":[]} ' ;
75
75
$ obj = json_decode ($ json );
76
76
$ this ->class ->parse ($ obj );
77
77
@@ -86,7 +86,7 @@ public function testParseIsCalledIssetData(): void
86
86
{
87
87
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
88
88
89
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[]} ' ;
89
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[]} ' ;
90
90
91
91
$ this ->class ->parse (json_decode ($ obj ));
92
92
@@ -101,7 +101,7 @@ public function testParseIsCalledIsNotArrayContent(): void
101
101
{
102
102
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
103
103
104
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":""} ' ;
104
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":""} ' ;
105
105
106
106
$ this ->class ->parse (json_decode ($ obj ));
107
107
@@ -116,7 +116,7 @@ public function testParseIsCalledIsArrayContentNoChild(): void
116
116
{
117
117
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
118
118
119
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":{}}]} ' ;
119
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":{}}]} ' ;
120
120
121
121
$ this ->class ->parse (json_decode ($ obj ));
122
122
@@ -131,7 +131,7 @@ public function testParseIsCalledIsArrayContentWrongChild(): void
131
131
{
132
132
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
133
133
134
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"test"}]}]} ' ;
134
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"test"}]}]} ' ;
135
135
136
136
$ this ->class ->parse (json_decode ($ obj ));
137
137
@@ -146,7 +146,7 @@ public function testParseIsCalledIsArrayContentRequest(): void
146
146
{
147
147
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
148
148
149
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpRequest", "attributes":{"method":"TEST"}, "content":{}}]}]} ' ;
149
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpRequest", "attributes":{"method":"TEST"}, "content":{}}]}]} ' ;
150
150
151
151
$ this ->class ->parse (json_decode ($ obj ));
152
152
@@ -161,7 +161,7 @@ public function testParseIsCalledIsArrayContentResponse(): void
161
161
{
162
162
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
163
163
164
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpResponse", "content":[], "attributes":{"statusCode":"1000", "headers":{"content":[]}}}]}]} ' ;
164
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpResponse", "content":[], "attributes":{"statusCode":"1000", "headers":{"content":[]}}}]}]} ' ;
165
165
166
166
$ this ->class ->parse (json_decode ($ obj ));
167
167
@@ -176,7 +176,7 @@ public function testParseIsCalledIsArrayContentDefault(): void
176
176
{
177
177
$ this ->set_reflection_property_value ('parent ' , $ this ->parent );
178
178
179
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"Cow", "content":[], "attributes":{"statusCode":"1000", "headers":{"content":[]}}}]}]} ' ;
179
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"Cow", "content":[], "attributes":{"statusCode":"1000", "headers":{"content":[]}}}]}]} ' ;
180
180
181
181
$ this ->class ->parse (json_decode ($ obj ));
182
182
@@ -202,7 +202,7 @@ public function testParseIsCalledIsArrayContentRequestList(): void
202
202
$ req_property ->setAccessible (true );
203
203
$ req_property ->setValue ($ this ->class , $ requests );
204
204
205
- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpRequest", "attributes":{"method":"TEST"}}]}]} ' ;
205
+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[{"element":"123", "content":[{"element":"httpRequest", "attributes":{"method":"TEST"}}]}]} ' ;
206
206
207
207
$ this ->class ->parse (json_decode ($ obj ));
208
208
@@ -375,12 +375,9 @@ public function testBuildURLVars(): void
375
375
->will ($ this ->returnValue ('STRING ' ));
376
376
$ var1 ->key = $ key1 ;
377
377
378
- $ vars = new \stdClass ();
379
- $ vars ->value = [ $ var1 ];
380
-
381
378
$ property = $ this ->reflection ->getProperty ('url_variables ' );
382
379
$ property ->setAccessible (true );
383
- $ property ->setValue ($ this ->class , $ vars );
380
+ $ property ->setValue ($ this ->class , [ $ var1 ] );
384
381
385
382
$ req_property = $ this ->reflection ->getProperty ('href ' );
386
383
$ req_property ->setAccessible (true );
0 commit comments