diff --git a/core/modules/page_cache/src/Tests/PageCacheTest.php b/core/modules/page_cache/src/Tests/PageCacheTest.php index b3b0430..761210a 100644 --- a/core/modules/page_cache/src/Tests/PageCacheTest.php +++ b/core/modules/page_cache/src/Tests/PageCacheTest.php @@ -308,7 +308,8 @@ public function testPageCacheAnonymousRolePermissions() { */ function testPageCacheAnonymous403404() { $admin_url = Url::fromRoute('system.admin'); - $invalid_url = 'foo/' . $this->randomString(); + // Use a random string without any illegal characters. + $invalid_url = 'foo/' . $this->randomMachineName(); $tests = [ 403 => $admin_url, 404 => $invalid_url,