Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / hal / tests / src / Functional / EntityResource / HalEntityNormalizationTrait.php
index 99ab3eb0c9dfa0c7744025335d61af3a90bd786e..1fc23291b57759d2f9dd8b59ac3dac9ce457249d 100644 (file)
@@ -97,22 +97,19 @@ trait HalEntityNormalizationTrait {
     if ($this->entity->getEntityType()->hasKey('bundle')) {
       $normalization = $this->getNormalizedPostEntity();
 
-
       $normalization['_links']['type'] = Url::fromUri('base:rest/type/' . static::$entityTypeId . '/bad_bundle_name');
       $request_options[RequestOptions::BODY] = $this->serializer->encode($normalization, static::$format);
 
-      // DX: 400 when incorrect entity type bundle is specified.
+      // DX: 422 when incorrect entity type bundle is specified.
       $response = $this->request($method, $url, $request_options);
-      $this->assertResourceErrorResponse(400, 'No entity type(s) specified', $response);
-
+      $this->assertResourceErrorResponse(422, 'No entity type(s) specified', $response);
 
       unset($normalization['_links']['type']);
       $request_options[RequestOptions::BODY] = $this->serializer->encode($normalization, static::$format);
 
-
-      // DX: 400 when no entity type bundle is specified.
+      // DX: 422 when no entity type bundle is specified.
       $response = $this->request($method, $url, $request_options);
-      $this->assertResourceErrorResponse(400, 'The type link relation must be specified.', $response);
+      $this->assertResourceErrorResponse(422, 'The type link relation must be specified.', $response);
     }
   }