This commit is contained in:
15
tests/Pest.php
Normal file
15
tests/Pest.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Laminas\Diactoros\ServerRequest;
|
||||
use League\Route\Router;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
function get(string $uri, array $headers = [], array $cookies = []): ResponseInterface
|
||||
{
|
||||
$router = app(Router::class);
|
||||
$request = new ServerRequest(uri: $uri, method: 'GET', headers: $headers, cookieParams: $cookies);
|
||||
|
||||
return $router->dispatch($request);
|
||||
}
|
||||
Reference in New Issue
Block a user