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