Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Class: session_manager_test  - 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.


array_session_diff_provider()   X-Ref
Data provider for the array_session_diff function.

return: array

test_array_session_diff(array $a, array $b, array $expected)   X-Ref
Tests array diff method in various situations.

param: array $a first value.
param: array $b second value to compare to $a.
param: array $expected the expected difference.