Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

The forum module mail generation tests.

Copyright: 2013 Andrew Nicols
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1606 lines (64 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 mod/forum/tests/cron_trait.php
 mod/forum/tests/generator_trait.php

Defines 1 class


Class: mod_forum_mail_testcase  - X-Ref

setUp()   X-Ref


tearDown()   X-Ref
No description

helper_spoof_message_inbound_setup()   X-Ref
Perform message inbound setup for the mod_forum reply handler.


test_cron_message_includes_courseid()   X-Ref
No description

test_forced_subscription()   X-Ref
No description

test_subscription_disabled_standard_users()   X-Ref
Ensure that for a forum with subscription disabled that standard users will not receive posts.


test_subscription_disabled_user_subscribed_forum()   X-Ref
Ensure that for a forum with subscription disabled that a user subscribed to the forum will receive the post.


test_subscription_disabled_user_subscribed_discussion()   X-Ref
Ensure that for a forum with subscription disabled that a user subscribed to the discussion will receive the
post.


test_automatic()   X-Ref
Ensure that for a forum with automatic subscription that users receive posts.


test_automatic_with_private_reply()   X-Ref
Ensure that private replies are not sent to users with an automatic subscription unless they are an expected
recipient.


test_optional()   X-Ref
No description

test_automatic_with_unsubscribed_user()   X-Ref
No description

test_optional_with_subscribed_user()   X-Ref
No description

test_automatic_with_unsubscribed_discussion()   X-Ref
No description

test_optional_with_subscribed_discussion()   X-Ref
No description

test_optional_with_subscribed_discussion_and_post()   X-Ref
No description

test_automatic_with_subscribed_discussion_in_unsubscribed_forum()   X-Ref
No description

test_optional_with_unsubscribed_discussion_in_subscribed_forum()   X-Ref
No description

test_forum_discussion_subscription_forum_unsubscribed_discussion_subscribed_after_post()   X-Ref
Test that a user unsubscribed from a forum who has subscribed to a discussion, only receives posts made after
they subscribed to the discussion.


test_subscription_by_inactive_users()   X-Ref
No description

test_forum_message_inbound_multiple_posts()   X-Ref
No description

test_long_subject()   X-Ref
No description

test_subjects()   X-Ref
Test inital email and reply email subjects


forum_post_email_templates_provider()   X-Ref
dataProvider for test_forum_post_email_templates().


test_forum_post_email_templates($data)   X-Ref
Verify forum emails body using templates to generate the expected results.

param: array $data provider samples.

test_already_mailed()   X-Ref
Ensure that posts already mailed are not re-sent.


test_mailnow()   X-Ref
Ensure that posts marked mailnow are not suspect to the maxeditingtime.


test_access_coursemodule_hidden()   X-Ref
Ensure that if a user has no permission to view a post, then it is not sent.


test_access_coursemodule_hidden_after_queue()   X-Ref
Ensure that if a user loses permission to view a post after it is queued, that it is not sent.


test_access_before_timestart()   X-Ref
Ensure that messages are not sent until the timestart.


test_access_after_timeend()   X-Ref
Ensure that messages are not sent after the timeend.


test_notification_customdata()   X-Ref
Test notification comes with customdata.