// Verify that we are still on the same page after login for allowed page.
$this->
assertSession()->
responseMatches('!<title.*?Compose tips.*?</title>!'
);
// Log out again and repeat with a non-403 page including query arguments.
$this->
drupalLogout();
$this->
drupalGet('filter/tips',
['query' =>
['foo' => 'bar'
]]);
$this->
assertSession()->
responseHeaderEquals(DynamicPageCacheSubscriber::HEADER, 'HIT'
);
$this->
submitForm($edit, 'Log in'
);
$this->
assertSession()->
pageTextNotContains('User login'
);
// Verify that we are still on the same page after login for allowed page.
$this->
assertSession()->
responseMatches('!<title.*?Compose tips.*?</title>!'
);
$this->
assertStringContainsString('/filter/tips?foo=bar',
$this->
getUrl(), 'Correct query arguments are displayed after login'
);
// Repeat with different query arguments.
$this->
drupalLogout();
$this->
drupalGet('filter/tips',
['query' =>
['foo' => 'baz'
]]);
$this->
assertSession()->
responseHeaderEquals(DynamicPageCacheSubscriber::HEADER, 'HIT'
);
$this->
submitForm($edit, 'Log in'
);
$this->
assertSession()->
pageTextNotContains('User login'
);
// Verify that we are still on the same page after login for allowed page.
$this->
assertSession()->
responseMatches('!<title.*?Compose tips.*?</title>!'
);
$this->
assertStringContainsString('/filter/tips?foo=baz',
$this->
getUrl(), 'Correct query arguments are displayed after login'
);