Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko authored and github-actions[bot] committed Feb 12, 2025
1 parent 7f0448a commit 2eaa33c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/ErrorsResponsesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;

use function Spatie\Snapshots\assertMatchesSnapshot;

it('adds validation error response', function () {
Expand Down Expand Up @@ -107,9 +108,8 @@
expect($openApiDocument['paths']['/test']['get']['responses'][409])->toHaveKey('content.application/json.schema.type', 'object');
});


it('adds http error response exception extending sympony HTTP exception is thrown', function () {
$openApiDocument = generateForRoute(fn() => RouteFacade::get('api/test', [ErrorsResponsesTest_Controller::class, 'symfony_http_exception_response']));
$openApiDocument = generateForRoute(fn () => RouteFacade::get('api/test', [ErrorsResponsesTest_Controller::class, 'symfony_http_exception_response']));

// AccessDeniedHttpException
expect($openApiDocument['paths']['/test']['get']['responses'][403])->toHaveKey('content.application/json.schema.type', 'object');
Expand Down Expand Up @@ -183,9 +183,7 @@ public function custom_exception_response(Illuminate\Http\Request $request)
/**
* @throws AccessDeniedHttpException|BadRequestHttpException|ConflictHttpException|GoneHttpException|LengthRequiredHttpException|LockedHttpException|MethodNotAllowedHttpException|NotAcceptableHttpException|PreconditionFailedHttpException|PreconditionRequiredHttpException|ServiceUnavailableHttpException|TooManyRequestsHttpException|UnauthorizedHttpException|UnprocessableEntityHttpException|UnsupportedMediaTypeHttpException
*/
public function symfony_http_exception_response(Illuminate\Http\Request $request)
{
}
public function symfony_http_exception_response(Illuminate\Http\Request $request) {}
}

class BusinessException extends \Symfony\Component\HttpKernel\Exception\HttpException
Expand Down

0 comments on commit 2eaa33c

Please sign in to comment.