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
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
We assume that the global can be wiped out
restore_admins()
Inherited
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
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
Utility method that resets permalinks and flushes rewrites.
set_permalink_structure(string $structure = '')
Inherited
| since |
2.6.0 bbPress (r5947) |
| global |
WP_Rewrite $wp_rewrite |
Parameters
$structure
stringOptional. Permalink structure to set. Default empty.
tearDown()
tearDown()
Inherited
Tear down globals set up in setUp_wp_mail()
tearDown_wp_mail($args)
InheritedStatic
test_bbp_bump_forum_ancestor_count_stops_outside_forum_hierarchy()
test_bbp_bump_forum_ancestor_count_stops_outside_forum_hierarchy()
test_bbp_bump_forum_reply_count()
test_bbp_bump_forum_reply_count()
test_bbp_bump_forum_topic_count()
test_bbp_bump_forum_topic_count()
test_bbp_bump_forum_topic_count_hidden()
test_bbp_bump_forum_topic_count_hidden()
test_bbp_bump_forum_topic_count_preserves_an_interleaved_update()
test_bbp_bump_forum_topic_count_preserves_an_interleaved_update()
test_bbp_decrease_forum_reply_count()
test_bbp_decrease_forum_reply_count()
test_bbp_decrease_forum_topic_count()
test_bbp_decrease_forum_topic_count()
test_bbp_decrease_forum_topic_count_hidden()
test_bbp_decrease_forum_topic_count_hidden()
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()
test_bbp_forum_new_pending_topic_counts()
test_bbp_forum_new_pending_topic_counts()
Generic function to test the forum counts with a new topic
test_bbp_forum_new_topic_counts()
test_bbp_forum_reply_count_excludes_new_public_reply_in_pending_topic()
test_bbp_forum_reply_count_excludes_new_public_reply_in_pending_topic()
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()
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()
test_bbp_increase_forum_reply_count()
test_bbp_increase_forum_reply_count()
test_bbp_increase_forum_topic_count()
test_bbp_increase_forum_topic_count()
test_bbp_increase_forum_topic_count_hidden()
test_bbp_increase_forum_topic_count_hidden()
test_bbp_status_transition_counts_can_be_short_circuited()
test_bbp_status_transition_counts_can_be_short_circuited()
test_bbp_update_forum_reply_count()
test_bbp_update_forum_reply_count()
test_bbp_update_forum_subforum_count()
test_bbp_update_forum_subforum_count()
test_bbp_update_forum_subforum_count_includes_supported_visibilities()
test_bbp_update_forum_subforum_count_includes_supported_visibilities()
test_bbp_update_forum_topic_count()
test_bbp_update_forum_topic_count()
test_bbp_update_forum_topic_count_hidden()
test_bbp_update_forum_topic_count_hidden()
test_bbp_update_forum_topic_count_hidden_rebuilds_total_counts()
test_bbp_update_forum_topic_count_hidden_rebuilds_total_counts()
test_hidden_topic_counts_exclude_trashed_subforums()
test_hidden_topic_counts_exclude_trashed_subforums()
| covers |
|
| covers |
|
| ticket |
BBP3678 |
test_subforum_count_tracks_parent_changes()
test_subforum_count_tracks_parent_changes()
test_subforum_count_tracks_post_type_changes()
test_subforum_count_tracks_post_type_changes()
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()
Properties
$cached_SERVER_NAME
$cached_SERVER_NAME
Static