@@ -174,9 +174,7 @@ public function testCreateRedirectWithoutDefaults(): void
174174
175175 public function testCreateFromHttpException (): void
176176 {
177- $ httpException = HttpException::createMethodNotAllowed ([
178- 'headers ' => ['Allow ' => 'PATCH,PUT ' ],
179- ]);
177+ $ httpException = HttpException::createMethodNotAllowed (['allowedMethods ' => ['PATCH ' , 'PUT ' ]]);
180178
181179 /** @var MockObject|StreamInterface $body */
182180 $ body = $ this ->getMockByCalls (StreamInterface::class, [
@@ -186,7 +184,6 @@ public function testCreateFromHttpException(): void
186184 /** @var MockObject|Response $response */
187185 $ response = $ this ->getMockByCalls (Response::class, [
188186 Call::create ('withHeader ' )->with ('Content-Type ' , 'application/problem+json ' )->willReturnSelf (),
189- Call::create ('withHeader ' )->with ('Allow ' , 'PATCH,PUT ' )->willReturnSelf (),
190187 Call::create ('getBody ' )->with ()->willReturn ($ body ),
191188 ]);
192189
@@ -202,9 +199,8 @@ public function testCreateFromHttpException(): void
202199 'type ' => 'https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.6 ' ,
203200 'status ' => 405 ,
204201 'title ' => 'Method Not Allowed ' ,
205- 'headers ' => [
206- 'Allow ' => 'PATCH,PUT ' ,
207- ],
202+ 'allowedMethods ' => ['PATCH ' , 'PUT ' ],
203+ '_type ' => 'apiProblem ' ,
208204 ], 'application/json ' )
209205 ->willReturn ('{"title":"Method Not Allowed"} ' ),
210206 ]);
0 commit comments