Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(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.

return: stdClass|null the object found, if any.
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

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.