Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298840

UiHelperTrait::drupalLogin breaks when user.login or user.logout route paths altered.

$
0
0

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.


Viewing all articles
Browse latest Browse all 298840

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>