Commit 888080dc authored by catch's avatar catch
Browse files

Issue #3127641 by mglaman, longwave: Typo in ResourceIdentifierNormalizer,...

Issue #3127641 by mglaman, longwave: Typo in ResourceIdentifierNormalizer, "mach" instead of "match"

(cherry picked from commit 6eda65df)
parent 56b9a310
......@@ -92,7 +92,7 @@ public function denormalize($data, $class, $format = NULL, array $context = [])
// resource.
if (!in_array($value['type'], $target_resource_type_names)) {
throw new BadRequestHttpException(sprintf(
'The provided type (%s) does not mach the destination resource types (%s).',
'The provided type (%s) does not match the destination resource types (%s).',
$value['type'],
implode(', ', $target_resource_type_names)
));
......
......@@ -1493,11 +1493,11 @@ protected function doTestRelationshipMutation(array $request_options) {
// Test POST: invalid target.
$request_options[RequestOptions::BODY] = Json::encode(['data' => [$resource_identifier]]);
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, sprintf('The provided type (%s) does not mach the destination resource types (%s).', $resource_identifier['type'], $target_identifier['type']), $url, $response, FALSE);
$this->assertResourceErrorResponse(400, sprintf('The provided type (%s) does not match the destination resource types (%s).', $resource_identifier['type'], $target_identifier['type']), $url, $response, FALSE);
// Test PATCH: invalid target.
$request_options[RequestOptions::BODY] = Json::encode(['data' => [$resource_identifier]]);
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, sprintf('The provided type (%s) does not mach the destination resource types (%s).', $resource_identifier['type'], $target_identifier['type']), $url, $response, FALSE);
$this->assertResourceErrorResponse(400, sprintf('The provided type (%s) does not match the destination resource types (%s).', $resource_identifier['type'], $target_identifier['type']), $url, $response, FALSE);
}
// Test POST: duplicate targets, no arity.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment