Skip to content

Commit

Permalink
Update tests for new options defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann committed Nov 8, 2024
1 parent 85efec0 commit 82f2b3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/Laravel/CachingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static function reloadTests(): iterable
public function testReload(?CacheInterface $cache, $reload, $openapisCached)
{
$options = [
OpenApiRouter::OPTION_OA_INFO_INJECT => true,
OpenApiRouter::OPTION_RELOAD => $reload,
OpenApiRouter::OPTION_CACHE => $cache,
];
Expand Down
7 changes: 5 additions & 2 deletions tests/Laravel/CallsApplicationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ public function createApplication()
]);
Facade::setFacadeApplication($app);

(new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app)))
$options = [
OpenApiRouter::OPTION_OA_INFO_INJECT => true,
];
(new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app), $options))
->registerRoutes();
$openapi = (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app)))
$openapi = (new OpenApiRouter($this->getFixtureFinder(), new LaravelRoutingAdapter($app), $options))
->scan();
file_put_contents(__DIR__ . '/openapi.yaml', $openapi->toYaml());

Expand Down
7 changes: 5 additions & 2 deletions tests/Slim4/CallsControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ protected function getApp(): App
{
$app = AppFactory::create();

(new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app)))
$options = [
OpenApiRouter::OPTION_OA_INFO_INJECT => true,
];
(new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app), $options))
->registerRoutes();
$openapi = (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app)))
$openapi = (new OpenApiRouter($this->getFixtureFinder(), new SlimRoutingAdapter($app), $options))
->scan();
file_put_contents(__DIR__ . '/openapi.yaml', $openapi->toYaml());

Expand Down

0 comments on commit 82f2b3b

Please sign in to comment.