@@ -71,7 +71,7 @@ public function testParseIsCalledIssetHrefVariables(): void
7171 {
7272 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
7373
74- $ json = '{"attributes":{"href":"something", "hrefVariables":{"hello":"world"}}, "content":[]} ' ;
74+ $ json = '{"attributes":{"href":"something", "hrefVariables":{"content": [{"element": "member", " hello":"world"}] }}, "content":[]} ' ;
7575 $ obj = json_decode ($ json );
7676 $ this ->class ->parse ($ obj );
7777
@@ -86,7 +86,7 @@ public function testParseIsCalledIssetData(): void
8686 {
8787 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
8888
89- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[]} ' ;
89+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":[]} ' ;
9090
9191 $ this ->class ->parse (json_decode ($ obj ));
9292
@@ -101,7 +101,7 @@ public function testParseIsCalledIsNotArrayContent(): void
101101 {
102102 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
103103
104- $ obj = '{"attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":""} ' ;
104+ $ obj = '{"element": "dataStructure", " attributes":{"href":"something", "data":{"content":{"hello":"world"}}}, "content":""} ' ;
105105
106106 $ this ->class ->parse (json_decode ($ obj ));
107107
@@ -116,7 +116,7 @@ public function testParseIsCalledIsArrayContentNoChild(): void
116116 {
117117 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
118118
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":{}}]} ' ;
120120
121121 $ this ->class ->parse (json_decode ($ obj ));
122122
@@ -131,7 +131,7 @@ public function testParseIsCalledIsArrayContentWrongChild(): void
131131 {
132132 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
133133
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"}]}]} ' ;
135135
136136 $ this ->class ->parse (json_decode ($ obj ));
137137
@@ -146,7 +146,7 @@ public function testParseIsCalledIsArrayContentRequest(): void
146146 {
147147 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
148148
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":{}}]}]} ' ;
150150
151151 $ this ->class ->parse (json_decode ($ obj ));
152152
@@ -161,7 +161,7 @@ public function testParseIsCalledIsArrayContentResponse(): void
161161 {
162162 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
163163
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":[]}}}]}]} ' ;
165165
166166 $ this ->class ->parse (json_decode ($ obj ));
167167
@@ -176,7 +176,7 @@ public function testParseIsCalledIsArrayContentDefault(): void
176176 {
177177 $ this ->set_reflection_property_value ('parent ' , $ this ->parent );
178178
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":[]}}}]}]} ' ;
180180
181181 $ this ->class ->parse (json_decode ($ obj ));
182182
@@ -202,7 +202,7 @@ public function testParseIsCalledIsArrayContentRequestList(): void
202202 $ req_property ->setAccessible (true );
203203 $ req_property ->setValue ($ this ->class , $ requests );
204204
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"}}]}]} ' ;
206206
207207 $ this ->class ->parse (json_decode ($ obj ));
208208
@@ -375,12 +375,9 @@ public function testBuildURLVars(): void
375375 ->will ($ this ->returnValue ('STRING ' ));
376376 $ var1 ->key = $ key1 ;
377377
378- $ vars = new \stdClass ();
379- $ vars ->value = [ $ var1 ];
380-
381378 $ property = $ this ->reflection ->getProperty ('url_variables ' );
382379 $ property ->setAccessible (true );
383- $ property ->setValue ($ this ->class , $ vars );
380+ $ property ->setValue ($ this ->class , [ $ var1 ] );
384381
385382 $ req_property = $ this ->reflection ->getProperty ('href ' );
386383 $ req_property ->setAccessible (true );
0 commit comments