public function SessionLimitLogoutTestCase::testSessionLogoutOnMax1 in Session Limit 8
Same name in this branch
- 8 tests/session_limit.test \SessionLimitLogoutTestCase::testSessionLogoutOnMax1()
- 8 tests/SessionLimitLogoutTestCase.php \Drupal\session_limit\SessionLimitLogoutTestCase::testSessionLogoutOnMax1()
Same name and namespace in other branches
- 2.x tests/SessionLimitLogoutTestCase.php \Drupal\session_limit\SessionLimitLogoutTestCase::testSessionLogoutOnMax1()
Test user can only have 1 session, logout oldest.
File
- tests/SessionLimitLogoutTestCase.php, line 31 
Class
- SessionLimitLogoutTestCase
- Session limit functions when expected behaviour is to logout oldest session.
Namespace
Drupal\session_limitCode
public function testSessionLogoutOnMax1() {
  // Set the default session limit.
  \Drupal::configFactory()
    ->getEditable('session_limit.settings')
    ->set('session_limit_max', 1)
    ->save();
  $this
    ->assertSessionLogout(1);
  $this
    ->closeAllSessions();
}