@@ -121,7 +121,6 @@ public function testPrependWhenNotEnabled()
121121 public function testLoadDefaultConfig ()
122122 {
123123 $ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
124- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
125124 $ containerBuilder = $ containerBuilderProphecy ->reveal ();
126125
127126 $ this ->extension ->load (self ::DEFAULT_CONFIG , $ containerBuilder );
@@ -133,7 +132,6 @@ public function testSetNameConverter()
133132
134133 $ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
135134 $ containerBuilderProphecy ->setAlias ('api_platform.name_converter ' , $ nameConverterId )->shouldBeCalled ();
136- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
137135 $ containerBuilder = $ containerBuilderProphecy ->reveal ();
138136
139137 $ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['name_converter ' => $ nameConverterId ]]), $ containerBuilder );
@@ -147,7 +145,6 @@ public function testEnableFosUser()
147145 'FOSUserBundle ' => FOSUserBundle::class,
148146 ])->shouldBeCalled ();
149147 $ containerBuilderProphecy ->setDefinition ('api_platform.fos_user.event_listener ' , Argument::type (Definition::class))->shouldBeCalled ();
150- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
151148 $ containerBuilder = $ containerBuilderProphecy ->reveal ();
152149
153150 $ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['enable_fos_user ' => true ]]), $ containerBuilder );
@@ -162,7 +159,6 @@ public function testEnableNelmioApiDoc()
162159 ])->shouldBeCalled ();
163160 $ containerBuilderProphecy ->setDefinition ('api_platform.nelmio_api_doc.annotations_provider ' , Argument::type (Definition::class))->shouldBeCalled ();
164161 $ containerBuilderProphecy ->setDefinition ('api_platform.nelmio_api_doc.parser ' , Argument::type (Definition::class))->shouldBeCalled ();
165- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
166162 $ containerBuilder = $ containerBuilderProphecy ->reveal ();
167163
168164 $ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['enable_nelmio_api_doc ' => true ]]), $ containerBuilder );
@@ -172,7 +168,6 @@ public function testDisableEagerLoadingExtension()
172168 {
173169 $ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
174170 $ containerBuilderProphecy ->setParameter ('api_platform.eager_loading.enabled ' , false )->shouldBeCalled ();
175- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
176171 $ containerBuilderProphecy ->removeDefinition ('api_platform.doctrine.orm.query_extension.eager_loading ' )->shouldBeCalled ();
177172 $ containerBuilder = $ containerBuilderProphecy ->reveal ();
178173 $ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['eager_loading ' => ['enabled ' => false ]]]), $ containerBuilder );
@@ -202,6 +197,8 @@ private function getContainerBuilderProphecy()
202197 'api_platform.collection.pagination.page_parameter_name ' => 'page ' ,
203198 'api_platform.description ' => 'description ' ,
204199 'api_platform.error_formats ' => ['jsonproblem ' => ['application/problem+json ' ], 'jsonld ' => ['application/ld+json ' ]],
200+ 'api_platform.enable_swagger ' => true ,
201+ 'api_platform.enable_swagger_ui ' => true ,
205202 'api_platform.formats ' => ['jsonld ' => ['application/ld+json ' ], 'jsonhal ' => ['application/hal+json ' ]],
206203 'api_platform.exception_to_status ' => [ExceptionInterface::class => Response::HTTP_BAD_REQUEST , InvalidArgumentException::class => Response::HTTP_BAD_REQUEST ],
207204 'api_platform.title ' => 'title ' ,
0 commit comments