Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Starfox64 authored Jan 22, 2025
1 parent 32fdf79 commit 1577b91
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/Builders/SecurityBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use GoldSpecDigital\ObjectOrientedOAS\Objects\SecurityScheme;
use GoldSpecDigital\ObjectOrientedOAS\OpenApi;
use phpDocumentor\Reflection\DocBlock;
use Vyuldashev\LaravelOpenApi\Attributes\Operation as AttributesOperation;
use Vyuldashev\LaravelOpenApi\Attributes\SecurityRequirement as AttributesSecurityRequirement;
use Vyuldashev\LaravelOpenApi\Builders\Paths\Operation\SecurityBuilder;
use Vyuldashev\LaravelOpenApi\Builders\Paths\OperationsBuilder;
use Vyuldashev\LaravelOpenApi\Factories\SecuritySchemeFactory;
Expand Down Expand Up @@ -88,7 +88,7 @@ public function testWeCanAddOperationSecurityUsingBuilder()
$routeInfo->action = 'get';
$routeInfo->name = 'test route';
$routeInfo->actionAttributes = collect([
new AttributesOperation(security: JwtSecurityScheme::class),
new AttributesSecurityRequirement(JwtSecurityScheme::class),
]);
$routeInfo->uri = '/example';

Expand Down Expand Up @@ -161,12 +161,7 @@ public function testWeCanAddTurnOffOperationSecurityUsingBuilder()
$routeInfo->name = 'test route';
$routeInfo->actionDocBlock = new DocBlock('Test');
$routeInfo->actionAttributes = collect([
/**
* we can set secuity to null to turn it off, as
* that's the default value. So '' is next best
* option?
*/
new AttributesOperation(security: ''),
new AttributesSecurityRequirement(null),
]);

/** @var OperationsBuilder */
Expand Down

0 comments on commit 1577b91

Please sign in to comment.