Dispatches a request capturing the response for integration testing purposes into the Cake\Http stack.
Cake\Core\HttpApplicationInterface
The application that is being dispatched.
Constructor
Create a PSR7 request from the request spec.
Run a request and get the response.
Convert a URL array into a string URL via routing.
Resolve the provided URL into a string.
__construct(Cake\Core\HttpApplicationInterface $app)
Constructor
Cake\Core\HttpApplicationInterface
$app The test case to run.
_createRequest(array<string, mixed> $spec): Cake\Http\ServerRequest
Create a PSR7 request from the request spec.
array<string, mixed>
$spec The request spec.
Cake\Http\ServerRequest
execute(array<string, mixed> $requestSpec): Psr\Http\Message\ResponseInterface
Run a request and get the response.
array<string, mixed>
$requestSpec The request spec to execute.
Psr\Http\Message\ResponseInterface
LogicException
resolveRoute(array $url): string
Convert a URL array into a string URL via routing.
array
$url The url to resolve
string
resolveUrl(array|string $url): string
Resolve the provided URL into a string.
array|string
$url The URL array/string to resolve.
string
The application that is being dispatched.
Cake\Core\HttpApplicationInterface
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.TestSuite.MiddlewareDispatcher.html