diff -u b/core/modules/user/src/Tests/UserLoginTest.php b/core/modules/user/src/Tests/UserLoginTest.php
--- b/core/modules/user/src/Tests/UserLoginTest.php
+++ b/core/modules/user/src/Tests/UserLoginTest.php
@@ -178,13 +178,13 @@
if ($flood_trigger == 'user') {
$this->assertRaw(strtr('There have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', [
'@count' => $this->config('user.flood')->get('user_limit'),
- ':url' => \Drupal::url('user.pass'),
+ ':url' => \Drupal::urlGenerator()->generateFromRoute('user.pass'),
]));
}
else {
// No uid, so the limit is IP-based.
$this->assertRaw(strtr('Too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', [
- ':url' => \Drupal::url('user.pass'),
+ ':url' => \Drupal::urlGenerator()->generateFromRoute('user.pass'),
]));
}
}