Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

(no description)

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

Defines 1 class

entities_discussion_test:: (3 methods):
  test_entity()
  test_display_period_settings()
  diplay_period_options_provider()


Class: entities_discussion_test  - X-Ref

The discussion entity tests.

test_entity()   X-Ref
Test the entity returns expected values.


test_display_period_settings($testdescription, $startoffset, $endoffset,$timestartresult, $timeendresult, $isvisible)   X-Ref
Test the display period settings for discussions.
This covers each individual date function as well as the combination of the 2.

param: string $testdescription A basic description of the base assertions.
param: int $startoffset Start time offset with current time in seconds.
param: int $endoffset End time offset with current time in seconds.
param: bool $timestartresult Expected result from the has_started function
param: bool $timeendresult Expected result from the has_ended function
param: bool $isvisible Expected result from the is_timed_discussion_visible function

diplay_period_options_provider()   X-Ref
Data provider for test_display_period_settings().

return: array start/end time offsets and the expected results.