public function SessionLimitPreventTestCase::testSessionPreventOnMax1 in Session Limit 8
Same name in this branch
- 8 tests/session_limit.test \SessionLimitPreventTestCase::testSessionPreventOnMax1()
- 8 tests/SessionLimitPreventTestCase.php \Drupal\session_limit\SessionLimitPreventTestCase::testSessionPreventOnMax1()
Same name and namespace in other branches
- 2.x tests/SessionLimitPreventTestCase.php \Drupal\session_limit\SessionLimitPreventTestCase::testSessionPreventOnMax1()
Test user can only have 1 session, prevent new sessions.
File
- tests/
SessionLimitPreventTestCase.php, line 31
Class
- SessionLimitPreventTestCase
- Session limit functionality when behaviour is to prevent login at limit.
Namespace
Drupal\session_limitCode
public function testSessionPreventOnMax1() {
// Set the default session limit.
\Drupal::configFactory()
->getEditable('session_limit.settings')
->set('session_limit_max', 1)
->save();
$this
->assertSessionPrevent(1);
$this
->closeAllSessions();
}