If you alter the path for user.login or user.logout, the helpers for logging in and logging out in a test are broken.
Example code
if ($id === 'user.login') {
$route->setPath('/login');
}
elseif ($id === 'user.logout') {
$route->setPath('/logout');
}
elseif ($id === 'user.reset.login') {
$route->setPath('/id/reset/{uid}/{timestamp}/{hash}/login');
}
elseif ($id === 'user.reset') {
$route->setPath('/id/reset/{uid}/{timestamp}/{hash}');
}
elseif ($id === 'user.reset.form') {
$route->setPath('/id/reset/{uid}');
}
You get a HTTP 400 error because the only route at /user/login is the HTTP POST method version.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3094525-2.patch | 1009 bytes | mglaman |
Comments
Comment #2
mglamanThis should allow using altered
/user/loginand/user/logoutpaths.Comment #3
dinesh18 commentedManually. reviewed the patch. Looks good to me. +1 to RTBC
Comment #4
alexpottAs a test-only fix will backport to 8.8.x when the branch is unfrozen.
Committed and pushed d510989b8c to 9.0.x and 818a083616 to 8.9.x. Thanks!
Comment #7
alexpottBackported to 8.8.x as a test only fix.