Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

The discussion entity tests.

Copyright: 2019 Ryan Wyllie <ryan@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 182 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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


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