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 310 and 402] [Versions 39 and 402]

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