Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

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: 345 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.