@@ -55,9 +55,9 @@ public function asNonAdminUserICannotGetACollectionOfBooks(int $expectedCode, st
5555 self ::assertResponseHeaderSame ('content-type ' , 'application/problem+json; charset=utf-8 ' );
5656 self ::assertResponseHeaderSame ('link ' , '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error",<http://localhost/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ' );
5757 self ::assertJsonContains ([
58- '@type ' => 'hydra: Error ' ,
59- 'hydra: title ' => 'An error occurred ' ,
60- 'hydra: description ' => $ hydraDescription ,
58+ '@type ' => 'Error ' ,
59+ 'title ' => 'An error occurred ' ,
60+ 'description ' => $ hydraDescription ,
6161 ]);
6262 }
6363
@@ -78,9 +78,9 @@ public function asAdminUserICanGetACollectionOfBooks(FactoryCollection $factory,
7878 self ::assertResponseHeaderSame ('content-type ' , 'application/ld+json; charset=utf-8 ' );
7979 self ::assertEquals ('<https://localhost:443/.well-known/mercure>; rel="mercure" ' , $ response ->getHeaders ()['link ' ][1 ]);
8080 self ::assertJsonContains ([
81- 'hydra: totalItems ' => $ hydraTotalItems ,
81+ 'totalItems ' => $ hydraTotalItems ,
8282 ]);
83- self ::assertCount (min ($ itemsPerPage ?? $ hydraTotalItems , 30 ), $ response ->toArray ()['hydra: member ' ]);
83+ self ::assertCount (min ($ itemsPerPage ?? $ hydraTotalItems , 30 ), $ response ->toArray ()['member ' ]);
8484 self ::assertMatchesJsonSchema (file_get_contents (__DIR__ . '/schemas/Book/collection.json ' ));
8585 }
8686
@@ -145,9 +145,9 @@ public function asAdminUserICanGetACollectionOfBooksOrderedByTitle(): void
145145 self ::assertResponseIsSuccessful ();
146146 self ::assertResponseHeaderSame ('content-type ' , 'application/ld+json; charset=utf-8 ' );
147147 self ::assertEquals ('<https://localhost:443/.well-known/mercure>; rel="mercure" ' , $ response ->getHeaders ()['link ' ][1 ]);
148- self ::assertEquals ('Ball Lightning ' , $ response ->toArray ()['hydra: member ' ][0 ]['title ' ]);
149- self ::assertEquals ('Hyperion ' , $ response ->toArray ()['hydra: member ' ][1 ]['title ' ]);
150- self ::assertEquals ('The Wandering Earth ' , $ response ->toArray ()['hydra: member ' ][2 ]['title ' ]);
148+ self ::assertEquals ('Ball Lightning ' , $ response ->toArray ()['member ' ][0 ]['title ' ]);
149+ self ::assertEquals ('Hyperion ' , $ response ->toArray ()['member ' ][1 ]['title ' ]);
150+ self ::assertEquals ('The Wandering Earth ' , $ response ->toArray ()['member ' ][2 ]['title ' ]);
151151 self ::assertMatchesJsonSchema (file_get_contents (__DIR__ . '/schemas/Book/collection.json ' ));
152152 }
153153
@@ -197,9 +197,9 @@ public function asNonAdminUserICannotGetABook(int $expectedCode, string $hydraDe
197197 self ::assertResponseHeaderSame ('content-type ' , 'application/problem+json; charset=utf-8 ' );
198198 self ::assertResponseHeaderSame ('link ' , '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error",<http://localhost/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ' );
199199 self ::assertJsonContains ([
200- '@type ' => 'hydra: Error ' ,
201- 'hydra: title ' => 'An error occurred ' ,
202- 'hydra: description ' => $ hydraDescription ,
200+ '@type ' => 'Error ' ,
201+ 'title ' => 'An error occurred ' ,
202+ 'description ' => $ hydraDescription ,
203203 ]);
204204 }
205205
@@ -254,9 +254,9 @@ public function asNonAdminUserICannotCreateABook(int $expectedCode, string $hydr
254254 self ::assertResponseHeaderSame ('content-type ' , 'application/problem+json; charset=utf-8 ' );
255255 self ::assertResponseHeaderSame ('link ' , '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error",<http://localhost/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ' );
256256 self ::assertJsonContains ([
257- '@type ' => 'hydra: Error ' ,
258- 'hydra: title ' => 'An error occurred ' ,
259- 'hydra: description ' => $ hydraDescription ,
257+ '@type ' => 'Error ' ,
258+ 'title ' => 'An error occurred ' ,
259+ 'description ' => $ hydraDescription ,
260260 ]);
261261 }
262262
@@ -290,7 +290,7 @@ public static function getInvalidDataOnCreate(): iterable
290290 Response::HTTP_UNPROCESSABLE_ENTITY ,
291291 [
292292 '@type ' => 'ConstraintViolation ' ,
293- 'hydra: title ' => 'An error occurred ' ,
293+ 'title ' => 'An error occurred ' ,
294294 'violations ' => [
295295 [
296296 'propertyPath ' => 'book ' ,
@@ -316,8 +316,8 @@ public static function getInvalidData(): iterable
316316 Response::HTTP_UNPROCESSABLE_ENTITY ,
317317 [
318318 '@type ' => 'ConstraintViolation ' ,
319- 'hydra: title ' => 'An error occurred ' ,
320- 'hydra: description ' => 'condition: This value should be of type int|string. ' ,
319+ 'title ' => 'An error occurred ' ,
320+ 'description ' => 'condition: This value should be of type int|string. ' ,
321321 'violations ' => [
322322 [
323323 'propertyPath ' => 'condition ' ,
@@ -334,8 +334,8 @@ public static function getInvalidData(): iterable
334334 Response::HTTP_UNPROCESSABLE_ENTITY ,
335335 [
336336 '@type ' => 'ConstraintViolation ' ,
337- 'hydra: title ' => 'An error occurred ' ,
338- 'hydra: description ' => 'condition: This value should be of type int|string. ' ,
337+ 'title ' => 'An error occurred ' ,
338+ 'description ' => 'condition: This value should be of type int|string. ' ,
339339 'violations ' => [
340340 [
341341 'propertyPath ' => 'condition ' ,
@@ -352,7 +352,7 @@ public static function getInvalidData(): iterable
352352 Response::HTTP_UNPROCESSABLE_ENTITY ,
353353 [
354354 '@type ' => 'ConstraintViolation ' ,
355- 'hydra: title ' => 'An error occurred ' ,
355+ 'title ' => 'An error occurred ' ,
356356 'violations ' => [
357357 [
358358 'propertyPath ' => 'book ' ,
@@ -440,9 +440,9 @@ public function asNonAdminUserICannotUpdateBook(int $expectedCode, string $hydra
440440 self ::assertResponseHeaderSame ('content-type ' , 'application/problem+json; charset=utf-8 ' );
441441 self ::assertResponseHeaderSame ('link ' , '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error",<http://localhost/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ' );
442442 self ::assertJsonContains ([
443- '@type ' => 'hydra: Error ' ,
444- 'hydra: title ' => 'An error occurred ' ,
445- 'hydra: description ' => $ hydraDescription ,
443+ '@type ' => 'Error ' ,
444+ 'title ' => 'An error occurred ' ,
445+ 'description ' => $ hydraDescription ,
446446 ]);
447447 }
448448
@@ -564,9 +564,9 @@ public function asNonAdminUserICannotDeleteABook(int $expectedCode, string $hydr
564564 self ::assertResponseHeaderSame ('content-type ' , 'application/problem+json; charset=utf-8 ' );
565565 self ::assertResponseHeaderSame ('link ' , '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error",<http://localhost/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ' );
566566 self ::assertJsonContains ([
567- '@type ' => 'hydra: Error ' ,
568- 'hydra: title ' => 'An error occurred ' ,
569- 'hydra: description ' => $ hydraDescription ,
567+ '@type ' => 'Error ' ,
568+ 'title ' => 'An error occurred ' ,
569+ 'description ' => $ hydraDescription ,
570570 ]);
571571 }
572572
0 commit comments