Skip to content

Commit 10afe4b

Browse files
committed
Use Services for the FeatureTestTrait request.
1 parent 6b06020 commit 10afe4b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

system/Test/FeatureTestTrait.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use CodeIgniter\HTTP\IncomingRequest;
1616
use CodeIgniter\HTTP\Request;
1717
use CodeIgniter\HTTP\URI;
18-
use CodeIgniter\HTTP\UserAgent;
1918
use CodeIgniter\Router\Exceptions\RedirectException;
2019
use CodeIgniter\Router\RouteCollection;
2120
use Config\App;
@@ -292,7 +291,7 @@ protected function setupRequest(string $method, ?string $path = null): IncomingR
292291
{
293292
$path = URI::removeDotSegments($path);
294293
$config = config(App::class);
295-
$request = new IncomingRequest($config, new URI(), null, new UserAgent());
294+
$request = Services::request($config, true);
296295

297296
// $path may have a query in it
298297
$parts = explode('?', $path);

0 commit comments

Comments
 (0)