File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1515use CodeIgniter \Events \Events ;
1616use CodeIgniter \Exceptions \PageNotFoundException ;
1717use CodeIgniter \HTTP \Response ;
18+ use CodeIgniter \Test \Mock \MockCodeIgniter ;
19+ use Config \App ;
1820use Config \Routing ;
1921use Config \Services ;
2022
@@ -629,4 +631,19 @@ public function testAutoRoutingLegacy()
629631
630632 $ response ->assertOK ();
631633 }
634+
635+ public function testForceGlobalSecureRequests ()
636+ {
637+ $ config = config (App::class);
638+ $ config ->forceGlobalSecureRequests = true ;
639+ Factories::injectMock ('config ' , App::class, $ config );
640+
641+ $ this ->app = new MockCodeIgniter ($ config );
642+ $ this ->app ->initialize ();
643+
644+ $ response = $ this ->get ('/ ' );
645+
646+ // Do not redirect.
647+ $ response ->assertStatus (200 );
648+ }
632649}
You can’t perform that action at this time.
0 commit comments