@@ -121,7 +121,6 @@ public function testPrependWhenNotEnabled()
121
121
public function testLoadDefaultConfig ()
122
122
{
123
123
$ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
124
- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
125
124
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
126
125
127
126
$ this ->extension ->load (self ::DEFAULT_CONFIG , $ containerBuilder );
@@ -133,7 +132,6 @@ public function testSetNameConverter()
133
132
134
133
$ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
135
134
$ containerBuilderProphecy ->setAlias ('api_platform.name_converter ' , $ nameConverterId )->shouldBeCalled ();
136
- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
137
135
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
138
136
139
137
$ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['name_converter ' => $ nameConverterId ]]), $ containerBuilder );
@@ -147,7 +145,6 @@ public function testEnableFosUser()
147
145
'FOSUserBundle ' => FOSUserBundle::class,
148
146
])->shouldBeCalled ();
149
147
$ containerBuilderProphecy ->setDefinition ('api_platform.fos_user.event_listener ' , Argument::type (Definition::class))->shouldBeCalled ();
150
- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
151
148
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
152
149
153
150
$ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['enable_fos_user ' => true ]]), $ containerBuilder );
@@ -162,7 +159,6 @@ public function testEnableNelmioApiDoc()
162
159
])->shouldBeCalled ();
163
160
$ containerBuilderProphecy ->setDefinition ('api_platform.nelmio_api_doc.annotations_provider ' , Argument::type (Definition::class))->shouldBeCalled ();
164
161
$ containerBuilderProphecy ->setDefinition ('api_platform.nelmio_api_doc.parser ' , Argument::type (Definition::class))->shouldBeCalled ();
165
- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
166
162
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
167
163
168
164
$ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['enable_nelmio_api_doc ' => true ]]), $ containerBuilder );
@@ -172,7 +168,6 @@ public function testDisableEagerLoadingExtension()
172
168
{
173
169
$ containerBuilderProphecy = $ this ->getContainerBuilderProphecy ();
174
170
$ containerBuilderProphecy ->setParameter ('api_platform.eager_loading.enabled ' , false )->shouldBeCalled ();
175
- $ containerBuilderProphecy ->setParameter ('api_platform.enable_swagger ' , '1 ' )->shouldBeCalled ();
176
171
$ containerBuilderProphecy ->removeDefinition ('api_platform.doctrine.orm.query_extension.eager_loading ' )->shouldBeCalled ();
177
172
$ containerBuilder = $ containerBuilderProphecy ->reveal ();
178
173
$ this ->extension ->load (array_merge_recursive (self ::DEFAULT_CONFIG , ['api_platform ' => ['eager_loading ' => ['enabled ' => false ]]]), $ containerBuilder );
@@ -202,6 +197,8 @@ private function getContainerBuilderProphecy()
202
197
'api_platform.collection.pagination.page_parameter_name ' => 'page ' ,
203
198
'api_platform.description ' => 'description ' ,
204
199
'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 ,
205
202
'api_platform.formats ' => ['jsonld ' => ['application/ld+json ' ], 'jsonhal ' => ['application/hal+json ' ]],
206
203
'api_platform.exception_to_status ' => [ExceptionInterface::class => Response::HTTP_BAD_REQUEST , InvalidArgumentException::class => Response::HTTP_BAD_REQUEST ],
207
204
'api_platform.title ' => 'title ' ,
0 commit comments