Tests for the forum component count functions.

group forums
group functions
group counts
package bbPress
inherited_from \BBP_UnitTestCase

 Methods

assertPreConditions()

assertPreConditions() 
Inherited

clean_up_global_scope()

clean_up_global_scope() 
Inherited

Commit a MySQL transaction.

commit_transaction() 
InheritedStatic

go_to()

go_to($url) 
Inherited

Parameters

$url

We can't use grant_super_admin() because we will need to modify the list more than once, and grant_super_admin() can only be run once because of its global check

grant_super_admin($user_id) 
Inherited

Parameters

$user_id

We assume that the global can be wiped out

restore_admins() 
Inherited
see

setUp()

setUp() 
Inherited

Fake WP mail globals, to avoid errors

setUpBeforeClass() 
InheritedStatic

Set up globals necessary to avoid errors when using wp_mail()

setUp_wp_mail($args) 
InheritedStatic

Parameters

$args

WP's core tests use wp_set_current_user() to change the current user during tests. BP caches the current user differently, so we have to do a bit more work to change it

set_current_user($user_id) 
InheritedStatic

Parameters

$user_id

tearDown()

tearDown() 
Inherited

Tear down globals set up in setUp_wp_mail()

tearDown_wp_mail($args) 
InheritedStatic

Parameters

$args

test_bbp_bump_forum_ancestor_count_stops_outside_forum_hierarchy()

test_bbp_bump_forum_ancestor_count_stops_outside_forum_hierarchy() 
covers
ticket BBP3678

test_bbp_bump_forum_reply_count()

test_bbp_bump_forum_reply_count() 
covers

test_bbp_bump_forum_topic_count()

test_bbp_bump_forum_topic_count() 
covers

test_bbp_bump_forum_topic_count_hidden()

test_bbp_bump_forum_topic_count_hidden() 
covers

test_bbp_bump_forum_topic_count_preserves_an_interleaved_update()

test_bbp_bump_forum_topic_count_preserves_an_interleaved_update() 
covers
ticket BBP3678

test_bbp_decrease_forum_reply_count()

test_bbp_decrease_forum_reply_count() 
covers

test_bbp_decrease_forum_topic_count()

test_bbp_decrease_forum_topic_count() 
covers

test_bbp_decrease_forum_topic_count_hidden()

test_bbp_decrease_forum_topic_count_hidden() 
covers

Generic function to test the forum counts on a approved/unapproved topic

test_bbp_forum_approved_unapproved_topic_counts() 

test_bbp_forum_draft_topic_is_not_counted_as_hidden()

test_bbp_forum_draft_topic_is_not_counted_as_hidden() 
covers

test_bbp_forum_new_pending_topic_counts()

test_bbp_forum_new_pending_topic_counts() 
covers

Generic function to test the forum counts with a new topic

test_bbp_forum_new_topic_counts() 
covers

test_bbp_forum_reply_count_excludes_new_public_reply_in_pending_topic()

test_bbp_forum_reply_count_excludes_new_public_reply_in_pending_topic() 
covers

test_bbp_forum_reply_count_stays_excluded_when_pending_topic_is_trashed_and_restored()

test_bbp_forum_reply_count_stays_excluded_when_pending_topic_is_trashed_and_restored() 
covers

Generic function to test the forum counts on a spammed/unspammed topic

test_bbp_forum_spammed_unspammed_topic_counts() 

Generic function to test the forum counts on a trashed/untrashed topic

test_bbp_forum_trashed_untrashed_topic_counts() 

test_bbp_get_countable_forum_statuses()

test_bbp_get_countable_forum_statuses() 
covers

test_bbp_increase_forum_reply_count()

test_bbp_increase_forum_reply_count() 
covers

test_bbp_increase_forum_topic_count()

test_bbp_increase_forum_topic_count() 
covers

test_bbp_increase_forum_topic_count_hidden()

test_bbp_increase_forum_topic_count_hidden() 
covers

test_bbp_status_transition_counts_can_be_short_circuited()

test_bbp_status_transition_counts_can_be_short_circuited() 
covers
ticket BBP3678

test_bbp_update_forum_reply_count()

test_bbp_update_forum_reply_count() 
covers

test_bbp_update_forum_subforum_count()

test_bbp_update_forum_subforum_count() 
covers
ticket BBP2649

test_bbp_update_forum_subforum_count_includes_supported_visibilities()

test_bbp_update_forum_subforum_count_includes_supported_visibilities() 
covers
ticket BBP2649

test_bbp_update_forum_topic_count()

test_bbp_update_forum_topic_count() 
covers

test_bbp_update_forum_topic_count_hidden()

test_bbp_update_forum_topic_count_hidden() 
covers

test_bbp_update_forum_topic_count_hidden_rebuilds_total_counts()

test_bbp_update_forum_topic_count_hidden_rebuilds_total_counts() 
covers

test_hidden_topic_counts_exclude_trashed_subforums()

test_hidden_topic_counts_exclude_trashed_subforums() 
covers
covers
ticket BBP3678

test_hidden_total_count_meta_is_registered()

test_hidden_total_count_meta_is_registered() 
covers

test_subforum_count_tracks_parent_changes()

test_subforum_count_tracks_parent_changes() 
covers
ticket BBP2649

test_subforum_count_tracks_post_type_changes()

test_subforum_count_tracks_post_type_changes() 
covers
ticket BBP2649

test_subforum_count_tracks_trash_restore_and_deletion()

test_subforum_count_tracks_trash_restore_and_deletion() 
covers
covers
ticket BBP2649

test_topic_status_transition_updates_ancestor_forum_reply_counts()

test_topic_status_transition_updates_ancestor_forum_reply_counts() 
covers
ticket BBP3678

 Properties

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static