diff --git a/tests/src/Functional/UserTest.php b/tests/src/Functional/UserTest.php index 1a4277b..d149b26 100644 --- a/tests/src/Functional/UserTest.php +++ b/tests/src/Functional/UserTest.php @@ -327,7 +327,10 @@ class UserTest extends ResourceTestBase { $response = $this->request('PATCH', $url, $request_options); // Ensure the email address has not changed. $this->assertEquals('admin@example.com', $this->entityStorage->loadUnchanged(1)->getEmail()); - $this->assertResourceErrorResponse(403, 'The current user is not allowed to PATCH the selected field (uid). The entity ID cannot be changed.', $url, $response, '/data/attributes/uid'); + $expected_message = floatval(\Drupal::VERSION) < 8.6 + ? 'The current user is not allowed to PATCH the selected field (uid). The entity ID cannot be changed' + : 'The current user is not allowed to PATCH the selected field (uid). The entity ID cannot be changed.'; + $this->assertResourceErrorResponse(403, $expected_message, $url, $response, '/data/attributes/uid'); } /**