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.

(no description)

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

Defines 1 class


Class: update_course_test  - X-Ref

Tests for the update_course class.

setupBeforeClass()   X-Ref
Setup to ensure that fixtures are loaded.


test_execute_course_state(string $format,string $action,array $expected,bool $expectexception,bool $assertdebug)   X-Ref
Test the webservice can execute a core state action (cm_state).

param: string $format the course format
param: string $action the state action name
param: array $expected the expected results
param: bool $expectexception if an exception should happen.
param: bool $assertdebug if an debug message should happen.

execute_course_state_provider()   X-Ref
Data provider for test_execute_course_state

return: array of 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_execute_wrong_courseid()   X-Ref
Test a wrong course id.


test_execute_target_params()   X-Ref
Test target params are passed to the state actions.