Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Unit tests for session manager class.

Copyright: 2013 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 914 lines (35 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_session_manager_testcase  - X-Ref

Unit tests for session manager class.

test_start()   X-Ref
No description

test_init_empty_session()   X-Ref
No description

test_set_user()   X-Ref
No description

test_login_user()   X-Ref
No description

test_terminate_current()   X-Ref
No description

test_write_close()   X-Ref
No description

test_session_exists()   X-Ref
No description

test_touch_session()   X-Ref
No description

test_kill_session()   X-Ref
No description

test_kill_user_sessions()   X-Ref
No description

test_apply_concurrent_login_limit()   X-Ref
No description

test_kill_all_sessions()   X-Ref
No description

test_gc()   X-Ref
No description

test_loginas()   X-Ref
Test loginas.


test_is_loggedinas()   X-Ref
No description

test_get_realuser()   X-Ref
No description

pages_sessionlocks()   X-Ref
Session lock info on pages.

return: array

test_get_recent_session_locks()   X-Ref
Test to get recent session locks.


test_update_recent_session_locks()   X-Ref
Test to update recent session locks.


test_get_session_lock_info()   X-Ref
Test to get session lock info.


sessionlock_history()   X-Ref
Session lock info on some pages to serve as history.

return: array

sessionlocks_info_provider()   X-Ref
Data provider for test_get_locked_page_at function.

return: array

test_get_locked_page_at($url, $time)   X-Ref
Test to get locked page at a speficic timestamp.

param: array $url Session lock page url.
param: array $time Session lock time.

test_cleanup_recent_session_locks()   X-Ref
Test cleanup recent session locks.


test_array_session_diff_same_array()   X-Ref
No description

test_array_session_diff_first_array_larger()   X-Ref
No description

test_array_session_diff_second_array_larger()   X-Ref
No description