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.

Class: base_test  - X-Ref

Unit tests for plugin base class.

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


tearDown()   X-Ref
Tear down the testable plugin manager singleton between tests.


test_load_disk_version_invalid_supported_version($supported, $incompatible, $version)   X-Ref
Test the load_disk_version function to check that it handles a variety of invalid supported fields.

param: array|null $supported Supported versions to inject
param: string|int|null $incompatible Incompatible version to inject.
param: int $version Version to test

load_disk_version_invalid_supported_version_provider()   X-Ref
Data provider for the load_disk_version tests for testing with invalid supported fields.

return: array

test_load_disk_version_invalid_incompatible_version($incompatible)   X-Ref
Test the load_disk_version function to check that it handles a variety of invalid incompatible fields.

param: mixed $incompatible

load_disk_version_invalid_incompatible_version_provider()   X-Ref
Data provider for the load_disk_version tests for testing with invalid incompatible fields.

return: array

test_load_disk_version_branch_supports($supported, $incompatible, $version)   X-Ref
Test the load_disk_version function to check that it handles a range of correct supported and incompatible field
definitions.

param: array|null $supported Supported versions to inject
param: string|int|null $incompatible Incompatible version to inject.
param: int $version Version to test

load_disk_version_branch_supports_provider()   X-Ref
Test cases for tests of load_disk_version for testing the supported/incompatible fields.

return: array