public function AutologoutTest::testAutologoutAlternateLogoutMethod in Automated Logout 8
Tests a user is logged out with the alternate logout method.
File
- tests/
src/ Functional/ AutologoutTest.php, line 111
Class
- AutologoutTest
- Tests the autologout's features.
Namespace
Drupal\Tests\autologout\FunctionalCode
public function testAutologoutAlternateLogoutMethod() {
// Test that alternate logout works as expected.
$this
->drupalGet('autologout_alt_logout');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains($this
->t('You have been logged out due to inactivity.'));
// Check further logout requests result in access denied.
$this
->drupalGet('autologout_alt_logout');
$this
->assertSession()
->statusCodeEquals(403);
}