PendingTestResponse
class PendingTestResponse
Methods
Retrieve every page of registered tools.
Retrieve every page of registered resources.
Retrieve every page of registered prompts.
Complete an argument for the given primitive.
Resolve a primitive class or use the supplied instance.
Start the server with a testing transport.
Execute a request and capture protocol errors.
Authenticate the current invocation as the given user.
Expand a resource URI using the supplied variables.
Details
at line 30
__construct(Container $app, string $serverClass)
Create a pending invocation for the given server.
at line 39
TestListResponse
tools()
Retrieve every page of registered tools.
at line 74
TestListResponse
resources()
Retrieve every page of registered resources.
at line 109
TestListResponse
prompts()
Retrieve every page of registered prompts.
at line 147
TestResponse
tool(Tool|string $tool, array $arguments = [])
Invoke the given tool.
at line 158
TestResponse
prompt(Prompt|string $prompt, array $arguments = [])
Invoke the given prompt.
at line 169
TestResponse
resource(Resource|string $resource, array $arguments = [])
Read the given resource.
at line 180
TestResponse
completion(Primitive|string $primitive, string $argumentName, string $argumentValue = '', array $currentArgs = [])
Complete an argument for the given primitive.
at line 214
protected array
buildCompletionRef(Primitive $primitive)
Build the completion reference for a primitive.
at line 234
protected Primitive
resolvePrimitive(Primitive|string $primitive)
Resolve a primitive class or use the supplied instance.
at line 244
protected Server
initializeServer()
Start the server with a testing transport.
at line 259
protected mixed
executeRequest(Server $server, JsonRpcRequest $request)
Execute a request and capture protocol errors.
at line 271
PendingTestResponse
actingAs(Authenticatable $user, string|null $guard = null)
Authenticate the current invocation as the given user.
at line 292
protected TestResponse
run(string $method, Primitive|string $primitive, array $arguments = [])
Invoke a primitive through the server's method handler.
at line 318
protected string
expandUriTemplate(UriTemplate $template, array $variables)
Expand a resource URI using the supplied variables.