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.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

licenselib tests.

Copyright: 2020 Tom Dickman <tom.dickman@catalyst-au.net>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 348 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/licenselib.php

Defines 1 class


Class: licenselib_test  - X-Ref

licenselib tests.

test_get_licenses()   X-Ref
Test getting licenses from database or cache.


test_save()   X-Ref
Test saving a license.


test_get_license_by_shortname()   X-Ref
Test ability to get a license by it's short name.


test_disable_license()   X-Ref
Test disabling a license.


test_enable_license()   X-Ref
Test enabling a license.


test_delete()   X-Ref
Test deleting a custom license.


test_delete_license_in_use_by_file()   X-Ref
Test trying to delete a license currently in use by a file.


test_delete_license_core()   X-Ref
Test trying to delete a core license.


test_delete_license_not_exists()   X-Ref
Test trying to delete a license which doesn't exist.


test_set_active_licenses()   X-Ref
Test setting active licenses.


test_get_active_licenses()   X-Ref
Test getting active licenses.


test_get_active_licenses_as_array()   X-Ref
Test getting active licenses as array.


test_reset_license_cache()   X-Ref
Test resetting the license cache.


test_install_licenses()   X-Ref
Test that all licenses are installed correctly.