Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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

(no description)

File Size: 311 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.

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

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