diff --git a/system/Test/FeatureTestTrait.php b/system/Test/FeatureTestTrait.php index 5647430609f0..b117a1d890ae 100644 --- a/system/Test/FeatureTestTrait.php +++ b/system/Test/FeatureTestTrait.php @@ -277,7 +277,8 @@ protected function setupRequest(string $method, ?string $path = null): IncomingR $path = $parts[0]; $query = $parts[1] ?? ''; - $_SERVER['QUERY_STRING'] = $query; + $superglobals = Services::superglobals(); + $superglobals->setServer('QUERY_STRING', $query); $uri->setPath($path); $uri->setQuery($query);