Search moodle.org's
Developer Documentation

See Release Notes

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

Differences Between: [Versions 400 and 402]

(no description)

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

Defines 2 classes

activity_header_test:: (4 methods):
  test_set_title()
  set_title_provider()
  test_set_attrs()
  test_set_attrs_invalid_variable()

member:: (2 methods):
  get_heading_level_provider()
  test_get_heading_level()


Class: activity_header_test  - X-Ref

Unit tests for activity header

test_set_title(string $value, string $expected)   X-Ref
Test the title setter

param: string $value
param: string $expected

set_title_provider()   X-Ref
Provider for the test_set_title unit test.

return: array

test_set_attrs()   X-Ref
Test setting multiple attributes


test_set_attrs_invalid_variable()   X-Ref
Test calling set_attrs with an invalid variable name


Class: member  - X-Ref

get_heading_level_provider()   X-Ref
Data provider for {@see test_get_heading_level()}.

return: array[]

test_get_heading_level(bool $allowtitle, string $title, int $expectedheadinglevel)   X-Ref
Test the heading level getter

param: bool $allowtitle Whether the title is allowed.
param: string $title The activity heading.
param: int $expectedheadinglevel The expected heading level.