Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

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

Defines 1 class


Class: stateupdates_test  - X-Ref

Tests for the stateupdates class.

test_add_course_put(string $role)   X-Ref
Test for add_course_put.

param: string $role the user role in the course

add_course_put_provider()   X-Ref
Data provider for test_add_course_put.

return: array testing scenarios

find_update(array $updatelist,string $action,string $name,int $identifier)   X-Ref
Helper methods to find a specific update in the updadelist.

param: array $updatelist the update list
param: string $action the action to find
param: string $name the element name to find
param: int $identifier the element id value
return: stdClass|null the object found, if any.

test_add_section(string $action, string $role, array $expected)   X-Ref
Add track about a section state update.

param: string $action the action name
param: string $role the user role name
param: array $expected the expected results

add_section_provider()   X-Ref
Data provider for test_add_section.

return: array testing scenarios

add_section_provider_helper(string $action)   X-Ref
Helper for add_section_provider scenarios.

param: string $action the action to perform
return: array testing scenarios

test_add_cm(string $action, string $role, array $expected)   X-Ref
Add track about a course module state update.

param: string $action the action name
param: string $role the user role name
param: array $expected the expected results

add_cm_provider()   X-Ref
Data provider for test_add_cm.

return: array testing scenarios

add_cm_provider_helper(string $action)   X-Ref
Helper for add_cm_provider scenarios.

param: string $action the action to perform
return: array testing scenarios