@@ -244,6 +244,21 @@ public function provideCurlRequests(): iterable
244244 'foo ' => 'fooval ' ,
245245 'bar ' => 'barval ' ,
246246 'baz ' => 'bazval ' ,
247+ 'foobar ' => [
248+ 'baz ' => 'bazval ' ,
249+ 'qux ' => 'quxval ' ,
250+ ],
251+ 'bazqux ' => ['bazquxval1 ' , 'bazquxval2 ' ],
252+ 'object ' => (object ) [
253+ 'fooprop ' => 'foopropval ' ,
254+ 'barprop ' => 'barpropval ' ,
255+ ],
256+ 'tostring ' => new class () {
257+ public function __toString (): string
258+ {
259+ return 'tostringval ' ;
260+ }
261+ },
247262 ],
248263 ],
249264 ],
@@ -253,14 +268,37 @@ public function provideCurlRequests(): iterable
253268 --url %1$shttp://localhost:8057/json%1$s \\
254269 --header %1$sAccept: */*%1$s \\
255270 --header %1$sContent-Type: application/x-www-form-urlencoded%1$s \\
256- --header %1$sContent-Length: 32 %1$s \\
271+ --header %1$sContent-Length: 211 %1$s \\
257272 --header %1$sAccept-Encoding: gzip%1$s \\
258273 --header %1$sUser-Agent: Symfony HttpClient/Native%1$s \\
259- --data %1$sfoo=fooval%1$s --data %1$sbar=barval%1$s --data %1$sbaz=bazval%1$s ' ,
274+ --data %1$sfoo=fooval%1$s --data %1$sbar=barval%1$s --data %1$sbaz=bazval%1$s --data %1$sfoobar[baz]=bazval%1$s --data %1$sfoobar[qux]=quxval%1$s --data %1$sbazqux[0]=bazquxval1%1$s --data %1$sbazqux[1]=bazquxval2%1$s --data %1$sobject[fooprop]=foopropval%1$s --data %1$sobject[barprop]=barpropval%1$s --data %1$stostring=tostringval%1$s ' ,
260275 ];
261276
262- // escapeshellarg on Windows replaces double quotes with spaces
277+ // escapeshellarg on Windows replaces double quotes & percent signs with spaces
263278 if ('\\' !== \DIRECTORY_SEPARATOR ) {
279+ yield 'GET with query ' => [
280+ [
281+ 'method ' => 'GET ' ,
282+ 'url ' => 'http://localhost:8057/?foo=fooval&bar=barval ' ,
283+ 'options ' => [
284+ 'query ' => [
285+ 'bar ' => 'newbarval ' ,
286+ 'foobar ' => [
287+ 'baz ' => 'bazval ' ,
288+ 'qux ' => 'quxval ' ,
289+ ],
290+ 'bazqux ' => ['bazquxval1 ' , 'bazquxval2 ' ],
291+ ],
292+ ],
293+ ],
294+ 'curl \\
295+ --compressed \\
296+ --request GET \\
297+ --url %1$shttp://localhost:8057/?foo=fooval&bar=newbarval&foobar%%5Bbaz%%5D=bazval&foobar%%5Bqux%%5D=quxval&bazqux%%5B0%%5D=bazquxval1&bazqux%%5B1%%5D=bazquxval2%1$s \\
298+ --header %1$sAccept: */*%1$s \\
299+ --header %1$sAccept-Encoding: gzip%1$s \\
300+ --header %1$sUser-Agent: Symfony HttpClient/Native%1$s ' ,
301+ ];
264302 yield 'POST with json ' => [
265303 [
266304 'method ' => 'POST ' ,
0 commit comments