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 400 and 401]

(no description)

File Size: 318 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

general_action_bar_test:: (4 methods):
  setUpBeforeClass()
  find_option_by_name()
  test_export_for_template()
  export_for_template_provider()


Class: general_action_bar_test  - X-Ref

A test class used to test general_action_bar.

setUpBeforeClass()   X-Ref
Load required test libraries


find_option_by_name(array $options, string $name)   X-Ref
Search array $options for an element which is an array containing 'name' => $name.

param: array $options the array of options.
param: string $name the name to find.
return: array|null the particular option if found, else null.

test_export_for_template(string $userrole, bool $enableoutcomes, array $expectedoptions)   X-Ref
Test the exported data for the general action bar for different user roles and settings.

param: string $userrole The user role to test
param: bool $enableoutcomes Whether to enable outcomes
param: array $expectedoptions The expected options returned in the general action selector

export_for_template_provider()   X-Ref
Data provider for the test_export_for_template test.

return: array