We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37ebc6f commit fe40d94Copy full SHA for fe40d94
1 file changed
tests/system/Test/FeatureTestTraitTest.php
@@ -15,6 +15,8 @@
15
use CodeIgniter\Events\Events;
16
use CodeIgniter\Exceptions\PageNotFoundException;
17
use CodeIgniter\HTTP\Response;
18
+use CodeIgniter\Test\Mock\MockCodeIgniter;
19
+use Config\App;
20
use Config\Routing;
21
use Config\Services;
22
@@ -629,4 +631,19 @@ public function testAutoRoutingLegacy()
629
631
630
632
$response->assertOK();
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
+ }
649
0 commit comments