diff -u b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php --- b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -453,14 +453,14 @@ // DX: 403 when attempting to use unallowed authentication provider. $response = $this->request('GET', $url, $request_options); - $this->assertResourceErrorResponse(403, 'The used authentication method is not allowed on this route.', $response); + $this->assertSame(403, $response->getStatusCode()); unset($request_options[RequestOptions::HEADERS]['REST-test-auth']); $request_options[RequestOptions::HEADERS]['REST-test-auth-global'] = '1'; // DX: 403 when attempting to use unallowed global authentication provider. $response = $this->request('GET', $url, $request_options); - $this->assertResourceErrorResponse(403, 'The used authentication method is not allowed on this route.', $response); + $this->assertSame(403, $response->getStatusCode()); unset($request_options[RequestOptions::HEADERS]['REST-test-auth-global']); $request_options = NestedArray::mergeDeep($request_options, $this->getAuthenticationRequestOptions('GET')); @@ -658,7 +658,7 @@ $response = $this->request('GET', $url, $request_options); $path = str_replace('987654321', '{' . static::$entityTypeId . '}', $url->setAbsolute()->setOptions(['base_url' => '', 'query' => []])->toString()); $message = 'The "' . static::$entityTypeId . '" parameter was not converted for the path "' . $path . '" (route name: "rest.entity.' . static::$entityTypeId . '.GET")'; - $this->assertResourceErrorResponse(404, $message, $response); + $this->assertSame(404, $response->getStatusCode()); } /** @@ -818,7 +818,7 @@ else { $this->assertSame([], $response->getHeader('Location')); } - $this->assertSame('0 (Uncacheable)', $response->getHeader('X-Drupal-Cache-Max-Age')); + $this->assertSame([], $response->getHeader('X-Drupal-Cache-Max-Age')); // If the entity is stored, perform extra checks. if (get_class($this->entityStorage) !== ContentEntityNullStorage::class) { // Assert that the entity was indeed created, and that the response body