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.

(no description)

File Size: 222 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

stateactions_test:: (4 methods):
  enrol_user()
  test_section_highlight()
  test_section_unhighlight()
  basic_role_provider()


Class: stateactions_test  - X-Ref

Topics course format related unit tests.

enrol_user(stdClass $course, string $rolename)   X-Ref
Enrol a user into a course and login as this user.

param: stdClass $course the course object
param: string $rolename the rolename

test_section_highlight(string $rolename, bool $expectedexception = false)   X-Ref
Tests for section_highlight method.

param: string $rolename The role of the user that will execute the method.
param: bool $expectedexception If this call will raise an exception.

test_section_unhighlight(string $rolename, bool $expectedexception = false)   X-Ref
Tests for section_unhighlight method.

param: string $rolename The role of the user that will execute the method.
param: bool $expectedexception If this call will raise an exception.

basic_role_provider()   X-Ref
Data provider for basic role tests.

return: array the testing scenarios