@@ -68,12 +68,6 @@ public function testParametersWithClassNameAsKey(): void
6868 {
6969 $ config = [
7070 'api_platform ' => [
71- 'title ' => 'Test API ' ,
72- 'description ' => 'Test Description ' ,
73- 'version ' => '1.0.0 ' ,
74- 'formats ' => ['json ' => ['mime_types ' => ['application/json ' ]]],
75- 'error_formats ' => [],
76- 'patch_formats ' => [],
7771 'defaults ' => [
7872 'parameters ' => [
7973 'ApiPlatform\Metadata\HeaderParameter ' => [
@@ -95,7 +89,6 @@ public function testParametersWithClassNameAsKey(): void
9589 $ defaults = $ this ->container ->getParameter ('api_platform.defaults ' );
9690 $ this ->assertArrayHasKey ('parameters ' , $ defaults );
9791
98- /** @var Parameters $parameters */
9992 $ parameters = $ defaults ['parameters ' ];
10093 $ this ->assertInstanceOf (Parameters::class, $ parameters );
10194
@@ -116,12 +109,6 @@ public function testMixedParameterDefinitions(): void
116109 {
117110 $ config = [
118111 'api_platform ' => [
119- 'title ' => 'Test API ' ,
120- 'description ' => 'Test Description ' ,
121- 'version ' => '1.0.0 ' ,
122- 'formats ' => ['json ' => ['mime_types ' => ['application/json ' ]]],
123- 'error_formats ' => [],
124- 'patch_formats ' => [],
125112 'defaults ' => [
126113 'parameters ' => [
127114 'ApiPlatform\Metadata\HeaderParameter ' => [
@@ -140,8 +127,10 @@ public function testMixedParameterDefinitions(): void
140127 (new ApiPlatformExtension ())->load ($ config , $ this ->container );
141128
142129 $ defaults = $ this ->container ->getParameter ('api_platform.defaults ' );
143- /** @var Parameters $parameters */
130+ $ this ->assertArrayHasKey ('parameters ' , $ defaults );
131+
144132 $ parameters = $ defaults ['parameters ' ];
133+ $ this ->assertInstanceOf (Parameters::class, $ parameters );
145134
146135 $ paramArray = iterator_to_array ($ parameters );
147136
@@ -156,12 +145,6 @@ public function testMultipleHeaderParameters(): void
156145 {
157146 $ config = [
158147 'api_platform ' => [
159- 'title ' => 'Test API ' ,
160- 'description ' => 'Test Description ' ,
161- 'version ' => '1.0.0 ' ,
162- 'formats ' => ['json ' => ['mime_types ' => ['application/json ' ]]],
163- 'error_formats ' => [],
164- 'patch_formats ' => [],
165148 'defaults ' => [
166149 'parameters ' => [
167150 'ApiPlatform\Metadata\HeaderParameter ' => [
@@ -176,8 +159,10 @@ public function testMultipleHeaderParameters(): void
176159 (new ApiPlatformExtension ())->load ($ config , $ this ->container );
177160
178161 $ defaults = $ this ->container ->getParameter ('api_platform.defaults ' );
179- /** @var Parameters $parameters */
162+ $ this ->assertArrayHasKey ('parameters ' , $ defaults );
163+
180164 $ parameters = $ defaults ['parameters ' ];
165+ $ this ->assertInstanceOf (Parameters::class, $ parameters );
181166
182167 $ paramArray = iterator_to_array ($ parameters );
183168 $ this ->assertNotEmpty ($ paramArray );
0 commit comments