Commit Graph
7 Commits
Author SHA1 Message Date
dualfroz 50c16b7998 fix: ignore line endings in console output assertions 2026-10-02 16:20:09 +02:00
upstream e8fb94b682 Upstream spiral/testing state of the touched files before 6e6e351854 2026-10-02 16:20:09 +02:00
dualfrozandroxblnfk 0171b86dd8 Keep configured auth transports when faking an actor (#91)
Assisted-By: Claude Fable 5.1
Co-authored-by: roxblnfk <roxblnfk@ya.ru>
2026-09-21 18:30:28 +04:00
upstream fdcc6b7728 Upstream spiral/testing state of the touched files before e812c3d094 2026-09-21 16:30:28 +02:00
dualfroz 4bb906a5d6 Type the configured transport registry for psalm 2026-09-14 17:08:13 +02:00
dualfroz 86d47b17ae Keep configured auth transports when faking an actor
withActor() replaced the whole TransportRegistry with a fresh one holding a
single transport named "testing". AuthTransportMiddleware, which is how
HttpAuthBootloader wires auth into an application, asks the registry for a
transport by name, so a request through it died with

    Spiral\Auth\Exception\TransportException: Undefined auth transport header

AuthMiddleware kept working because it iterates over every transport, which is
why the failure looked like it only happened with a custom transport.

The fake registry is now built from the names the application has configured,
each mapped to the same fake HeaderTransport that reads X-Test-Token, so
whichever name the middleware asks for it gets a transport that finds the test
token. "testing" stays and becomes the default. An application with no registry
bound behaves as before.

The test app had no withActor() coverage at all, so the three tests come with
two middleware stubs: one that runs AuthTransportMiddleware('header') resolved
from the http scope, one that reports the actor into the response body.

For spiral/framework#1231
2026-09-13 15:23:26 +02:00
upstream 20591647eb Upstream spiral/testing state of the touched files before 6c6aa8692d 2026-09-11 23:11:05 +02:00