@@ -228,20 +228,22 @@ public function testCreate()
228
228
public function testCreateCheckPrecedence ()
229
229
{
230
230
// server is used by default
231
- $ request = Request::create ('/ ' , 'GET ' , array (), array (), array (), array (
231
+ $ request = Request::create ('/ ' , 'DELETE ' , array (), array (), array (), array (
232
232
'HTTP_HOST ' => 'example.com ' ,
233
233
'HTTPS ' => 'on ' ,
234
234
'SERVER_PORT ' => 443 ,
235
235
'PHP_AUTH_USER ' => 'fabien ' ,
236
236
'PHP_AUTH_PW ' => 'pa$$ ' ,
237
237
'QUERY_STRING ' => 'foo=bar ' ,
238
+ 'CONTENT_TYPE ' => 'application/json ' ,
238
239
));
239
240
$ this ->assertEquals ('example.com ' , $ request ->getHost ());
240
241
$ this ->assertEquals (443 , $ request ->getPort ());
241
242
$ this ->assertTrue ($ request ->isSecure ());
242
243
$ this ->assertEquals ('fabien ' , $ request ->getUser ());
243
244
$ this ->assertEquals ('pa$$ ' , $ request ->getPassword ());
244
245
$ this ->assertEquals ('' , $ request ->getQueryString ());
246
+ $ this ->assertEquals ('application/json ' , $ request ->headers ->get ('CONTENT_TYPE ' ));
245
247
246
248
// URI has precedence over server
247
249
$ request = Request::
create (
'http://thomas:[email protected] :8080/?foo=bar ' ,
'GET ' ,
array (),
array (),
array (),
array (
0 commit comments