Search moodle.org's
Developer Documentation

See Release Notes

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

Differences Between: [Versions 400 and 403] [Versions 401 and 403]

(no description)

File Size: 258 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 mod/quiz/accessrule/seb/tests/test_helper_trait.php

Defines 1 class


Class: validate_quiz_access_test  - X-Ref

PHPUnit tests for external function.

setUp()   X-Ref
This method runs before every test.


bad_parameters_provider()   X-Ref
Bad parameter provider.

return: array

test_invalid_parameters($cmid, $url, $configkey, $messageregex)   X-Ref
Test exception thrown for bad parameters.

param: mixed $cmid Course module id.
param: mixed $url Page URL.
param: mixed $configkey SEB config key.
param: mixed $messageregex Error message regex to check.

test_context_is_not_valid_for_user()   X-Ref
Test that the user has permissions to access context.


test_no_keys_provided()   X-Ref
Test exception thrown when no key provided.


test_quiz_does_not_exist()   X-Ref
Test exception thrown if cmid doesn't match a quiz.


test_config_key_valid()   X-Ref
Test config key is valid.


test_config_key_not_valid()   X-Ref
Test config key is not valid.


test_browser_exam_key_valid()   X-Ref
Test browser exam key is valid.


test_browser_exam_key_not_valid()   X-Ref
Test browser exam key is not valid.