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 15
15
use CodeIgniter \Events \Events ;
16
16
use CodeIgniter \Exceptions \PageNotFoundException ;
17
17
use CodeIgniter \HTTP \Response ;
18
+ use CodeIgniter \Test \Mock \MockCodeIgniter ;
19
+ use Config \App ;
18
20
use Config \Routing ;
19
21
use Config \Services ;
20
22
@@ -629,4 +631,19 @@ public function testAutoRoutingLegacy()
629
631
630
632
$ response ->assertOK ();
631
633
}
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
+ }
632
649
}
You can’t perform that action at this time.
0 commit comments