From 2e627f65ef55b47055af588c4488373fad9a39f8 Mon Sep 17 00:00:00 2001 From: Manuel Christlieb Date: Fri, 15 May 2026 16:42:54 +0200 Subject: [PATCH] feat: expose ServerManager::setHttp for custom HTTP drivers --- src/ServerManager.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ServerManager.php b/src/ServerManager.php index 4e406fd9..4e1a4aab 100644 --- a/src/ServerManager.php +++ b/src/ServerManager.php @@ -91,4 +91,14 @@ public function http(): HttpServer default => new NullableHttpServer(), }; } + + /** + * Registers the HTTP server to use for browser tests. Call once from your + * test bootstrap (e.g. setUpBeforeClass) before the first visit(). When + * unset, the manager falls back to Laravel detection / NullableHttpServer. + */ + public function setHttp(HttpServer $http): void + { + $this->http = $http; + } }