You are here

public function SessionLimitPreventTestCase::testSessionPreventOnMax1 in Session Limit 7.2

Same name and namespace in other branches
  1. 8 tests/session_limit.test \SessionLimitPreventTestCase::testSessionPreventOnMax1()
  2. 6.2 tests/session_limit.test \SessionLimitPreventTestCase::testSessionPreventOnMax1()
  3. 2.x tests/session_limit.test \SessionLimitPreventTestCase::testSessionPreventOnMax1()

Test user can only have 1 session, prevent new sessions.

File

tests/session_limit.test, line 519
Simpletest tests for session_limit.

Class

SessionLimitPreventTestCase
Session limit functionality when behaviour is to prevent login at limit.

Code

public function testSessionPreventOnMax1() {

  // Set the default session limit.
  variable_set('session_limit_max', 1);
  $this
    ->assertSessionPrevent(1);
  $this
    ->closeAllSessions();
}