@@ -172,41 +172,43 @@ public static function provideCreateFromStringWithoutIndexPage(): iterable
172172 ];
173173 }
174174
175- public function testCreateFromStringWithIndexPageSubDirCombinations (){
176- $ standardUrl = "http://localhost:8080 " ;
175+ public function testCreateFromStringWithIndexPageSubDirCombinations (): void
176+ {
177+ $ standardUrl = 'http://localhost:8080 ' ;
177178 $ subDirectoryAppsOptions = [
178179 [
179- " subDir " => "" ,
180- " indexPage " => ""
180+ ' subDir ' => '' ,
181+ ' indexPage ' => '' ,
181182 ],
182183 [
183- " subDir " => "" ,
184- " indexPage " => " index.php "
184+ ' subDir ' => '' ,
185+ ' indexPage ' => ' index.php ' ,
185186 ],
186187 [
187- " subDir " => " /subdir " ,
188- " indexPage " => ""
188+ ' subDir ' => ' /subdir ' ,
189+ ' indexPage ' => '' ,
189190 ],
190191 [
191- " subDir " => " /subdir " ,
192- " indexPage " => " index.php "
192+ ' subDir ' => ' /subdir ' ,
193+ ' indexPage ' => ' index.php ' ,
193194 ],
194195 [
195- " subDir " => " /subdir/subsubdir " ,
196- " indexPage " => " index.php "
196+ ' subDir ' => ' /subdir/subsubdir ' ,
197+ ' indexPage ' => ' index.php ' ,
197198 ],
198199 ];
199- foreach ($ subDirectoryAppsOptions as $ option ){
200- $ route = "woot " ;
201- config (App::class)->baseURL = $ standardUrl . $ option ["subDir " ];
202- config (App::class)->indexPage = $ option ["indexPage " ];
203-
204- $ _SERVER ['PATH_INFO ' ] = '/ ' . $ route ;
205- $ _SERVER ['REQUEST_URI ' ] = $ option ["subDir " ] . "/ " . $ option ["indexPage " ] . $ _SERVER ['PATH_INFO ' ];
206- $ _SERVER ['SCRIPT_NAME ' ] = $ option ["subDir " ] . "/ " .$ option ["indexPage " ];
207- $ _SERVER ['HTTP_HOST ' ] = $ standardUrl ;
208-
209- $ factory = $ this ->createSiteURIFactory ();
200+
201+ foreach ($ subDirectoryAppsOptions as $ option ) {
202+ $ route = 'woot ' ;
203+ config (App::class)->baseURL = $ standardUrl . $ option ['subDir ' ];
204+ config (App::class)->indexPage = $ option ['indexPage ' ];
205+
206+ $ _SERVER ['PATH_INFO ' ] = '/ ' . $ route ;
207+ $ _SERVER ['REQUEST_URI ' ] = $ option ['subDir ' ] . '/ ' . $ option ['indexPage ' ] . $ _SERVER ['PATH_INFO ' ];
208+ $ _SERVER ['SCRIPT_NAME ' ] = $ option ['subDir ' ] . '/ ' . $ option ['indexPage ' ];
209+ $ _SERVER ['HTTP_HOST ' ] = $ standardUrl ;
210+
211+ $ factory = $ this ->createSiteURIFactory ();
210212 $ detectedRoutePath = $ factory ->detectRoutePath ();
211213 $ this ->assertSame ($ route , $ detectedRoutePath );
212214 }
0 commit comments