@@ -223,6 +223,21 @@ public function testCreate()
223
223
$ request = Request::create ('http://test.com/?foo ' );
224
224
$ this ->assertEquals ('/?foo ' , $ request ->getRequestUri ());
225
225
$ this ->assertEquals (array ('foo ' => '' ), $ request ->query ->all ());
226
+
227
+ ## assume rewrite rule: (.*) --> app/app.php ; app/ is a symlink to a symfony web/ directory
228
+ $ request = Request::create ('http://test.com/apparthotel-1234 ' , 'GET ' , array (), array (), array (),
229
+ array (
230
+ 'DOCUMENT_ROOT ' => '/var/www/www.test.com ' ,
231
+ 'SCRIPT_FILENAME ' => '/var/www/www.test.com/app/app.php ' ,
232
+ 'SCRIPT_NAME ' => '/app/app.php ' ,
233
+ 'PHP_SELF ' => '/app/app.php/apparthotel-1234 ' ,
234
+ ));
235
+ $ this ->assertEquals ('http://test.com/apparthotel-1234 ' , $ request ->getUri ());
236
+ $ this ->assertEquals ('/apparthotel-1234 ' , $ request ->getPathInfo ());
237
+ $ this ->assertEquals ('' , $ request ->getQueryString ());
238
+ $ this ->assertEquals (80 , $ request ->getPort ());
239
+ $ this ->assertEquals ('test.com ' , $ request ->getHttpHost ());
240
+ $ this ->assertFalse ($ request ->isSecure ());
226
241
}
227
242
228
243
/**
@@ -1299,7 +1314,7 @@ public function getBaseUrlData()
1299
1314
{
1300
1315
return array (
1301
1316
array (
1302
- '/foo%20bar ' ,
1317
+ '/foo%20bar/ ' ,
1303
1318
array (
1304
1319
'SCRIPT_FILENAME ' => '/home/John Doe/public_html/foo bar/app.php ' ,
1305
1320
'SCRIPT_NAME ' => '/foo bar/app.php ' ,
0 commit comments