InMemoryTransport
In-memory transport for tests. Pre-loaded with canned responses keyed by “METHOD path”. Records every call so tests can assert against them.
Methods
on()
function on(string $method, string $path, array $response): voidParameters
$response—array<string,mixed>
Annotations
@vararray<string,array<int,mixed>> queue of responses per route / private array $responses = []; /* @var list<array{method:string,path:string,body:?array<string,mixed>,headers:array<string,string>,accessToken:?string}> / public array $calls = []; /* Push a successful response for METHOD + path.
onError()
function onError(string $method, string $path, VenAuthException $error): voidPush an error to be thrown on the next match for METHOD + path.