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 module forums tests

Copyright: 2013 Frédéric Massart
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1451 lines (66 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 mod/forum/tests/generator_trait.php

Defines 1 class


Class: mod_forum_subscriptions_testcase  - X-Ref

setUp()   X-Ref
Test setUp.


tearDown()   X-Ref
Test tearDown.


test_subscription_modes()   X-Ref
No description

test_unsubscribable_forums()   X-Ref
Test fetching unsubscribable forums.


test_forum_subscribe_toggle_as_other()   X-Ref
Test that toggling the forum-level subscription for a different user does not affect their discussion-level
subscriptions.


test_forum_discussion_subscription_forum_unsubscribed()   X-Ref
Test that a user unsubscribed from a forum is not subscribed to it's discussions by default.


test_forum_discussion_subscription_forum_subscribed()   X-Ref
Test that the act of subscribing to a forum subscribes the user to it's discussions by default.


test_forum_discussion_subscription_forum_unsubscribed_discussion_subscribed()   X-Ref
Test that a user unsubscribed from a forum can be subscribed to a discussion.


test_forum_discussion_subscription_forum_subscribed_discussion_unsubscribed()   X-Ref
Test that a user subscribed to a forum can be unsubscribed from a discussion.


test_forum_discussion_toggle_forum_subscribed()   X-Ref
Test the effect of toggling the discussion subscription status when subscribed to the forum.


test_forum_discussion_toggle_forum_unsubscribed()   X-Ref
Test the effect of toggling the discussion subscription status when unsubscribed from the forum.


test_fetch_subscribed_users_subscriptions()   X-Ref
Test that the correct users are returned when fetching subscribed users from a forum where users can choose to
subscribe and unsubscribe.


test_fetch_subscribed_users_forced()   X-Ref
Test that the correct users are returned hwen fetching subscribed users from a forum where users are forcibly
subscribed.


test_fetch_subscribed_users_discussion_subscriptions()   X-Ref
Test that unusual combinations of discussion subscriptions do not affect the subscribed user list.


test_force_subscribed_to_forum()   X-Ref
Test whether a user is force-subscribed to a forum.


test_subscription_cache_prefill()   X-Ref
Test that the subscription cache can be pre-filled.


test_subscription_cache_fill()   X-Ref
Test that the subscription cache can filled user-at-a-time.


test_discussion_subscription_cache_fill_for_course()   X-Ref
Test that the discussion subscription cache can filled course-at-a-time.


test_discussion_subscription_cache_prefill()   X-Ref
Test that the discussion subscription cache can be forcibly updated for a user.


test_discussion_subscription_cache_fill()   X-Ref
Test that the discussion subscription cache can filled user-at-a-time.


test_forum_subscribe_toggle_as_other_repeat_subscriptions()   X-Ref
Test that after toggling the forum subscription as another user,
the discussion subscription functionality works as expected.


test_is_subscribed_cm()   X-Ref
Test that providing a context_module instance to is_subscribed does not result in additional lookups to retrieve
the context_module.


is_subscribable_forums()   X-Ref
No description

is_subscribable_provider()   X-Ref
No description

test_is_subscribable_logged_out($options)   X-Ref


test_is_subscribable_is_guest($options)   X-Ref


is_subscribable_loggedin_provider()   X-Ref
No description

test_is_subscribable_loggedin($options, $expect)   X-Ref


test_get_user_default_subscription()   X-Ref
No description