Files
api/services/nginx/app/tests/Unit/Router/RouterThrowableHandlingTest.php
T

11 lines
407 B
PHP

<?php
it('catches throwables during auto route loading and maps them to internal server errors', function (): void {
$routerFile = app_path('classes/router.php');
$content = file_get_contents($routerFile);
expect($content)->not->toBeFalse();
expect($content)->toContain('catch (\\Throwable $e)');
expect($content)->toContain('$response->internal_server_error($e->getMessage());');
});