Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Unit tests for core\output\choice class.

Copyright: 2023 Ferran Recio <ferran@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 195 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: choicelist_test  - X-Ref

Unit tests for the `icon_system` class.

test_empty_export()   X-Ref
Test for a choice without options.


test_basic_export()   X-Ref
Test for a choice with basic options.


test_option_defintion_export()   X-Ref
Test for a choice with extras options definition.


test_option_selected_export()   X-Ref
Test for a choice with option selected.


validate_option(array $option,string $value,string $name,?array $definition,bool $selected = false)   X-Ref
Validate a choice option export.

param: array $option the option export
param: string $value the option value
param: string $name the option name
param: array|null $definition the option definition
param: bool $selected if the option is selected