This repository was archived by the owner on Jul 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ public function testCreateFromHttpException(): void
199199 'type ' => 'https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.6 ' ,
200200 'status ' => 405 ,
201201 'title ' => 'Method Not Allowed ' ,
202+ 'detail ' => null ,
203+ 'instance ' => null ,
202204 'allowedMethods ' => ['PATCH ' , 'PUT ' ],
203205 '_type ' => 'apiProblem ' ,
204206 ], 'application/json ' )
Original file line number Diff line number Diff line change @@ -233,7 +233,8 @@ public function handle(ServerRequestInterface $request): ResponseInterface
233233
234234 $ data = $ httpException ->jsonSerialize ();
235235
236- self ::assertArrayNotHasKey ('detail ' , $ data );
236+ self ::assertArrayHasKey ('detail ' , $ data );
237+ self ::assertNull ($ data ['detail ' ]);
237238 self ::assertArrayNotHasKey ('backtrace ' , $ data );
238239 }),
239240 'application/xml ' ,
@@ -303,7 +304,8 @@ public function handle(ServerRequestInterface $request): ResponseInterface
303304
304305 $ data = $ httpException ->jsonSerialize ();
305306
306- self ::assertArrayNotHasKey ('detail ' , $ data );
307+ self ::assertArrayHasKey ('detail ' , $ data );
308+ self ::assertNull ($ data ['detail ' ]);
307309 self ::assertArrayNotHasKey ('backtrace ' , $ data );
308310 }),
309311 'application/xml ' ,
You can’t perform that action at this time.
0 commit comments