File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,22 @@ public function testPatchRequestMethod()
409
409
$ this ->assertEquals ('PATCH ' , $ test ->server ('request_method ' , 'PATCH ' ));
410
410
}
411
411
412
+ public function testPatchRequestMethodWithMultidimArray ()
413
+ {
414
+ $ data = array (
415
+ 'data ' => array (
416
+ 'foo ' => 'bar ' ,
417
+ 'wibble ' => 'wubble ' ,
418
+ ),
419
+ );
420
+
421
+ $ curl = new Curl ();
422
+ $ curl ->setHeader ('X-DEBUG-TEST ' , 'data_values ' );
423
+ $ curl ->patch (Test::TEST_URL , $ data );
424
+ $ this ->assertEquals ('{"data":{"foo":"bar","wibble":"wubble"}} ' , $ curl ->rawResponse );
425
+ $ this ->assertEquals (json_decode (json_encode ($ data ), false ), $ curl ->response );
426
+ }
427
+
412
428
public function testDeleteRequestMethod ()
413
429
{
414
430
$ test = new Test ();
Original file line number Diff line number Diff line change 236
236
'delete ' => $ _DELETE ,
237
237
));
238
238
exit ;
239
+ } elseif ($ test === 'data_values ' ) {
240
+ header ('Content-Type: application/json ' );
241
+ echo json_encode ($ data_values );
242
+ exit ;
239
243
}
240
244
241
245
header ('Content-Type: text/plain ' );
You can’t perform that action at this time.
0 commit comments