Tests for bbPress forum visibility functions.
| group |
forums |
| group |
functions |
| group |
visibility |
| 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_forum_enforce_hidden()
test_bbp_forum_enforce_hidden()
| covers |
|
| todo |
Implement test_bbp_forum_enforce_hidden(). |
test_bbp_forum_enforce_private()
test_bbp_forum_enforce_private()
| covers |
|
| todo |
Implement test_bbp_forum_enforce_private(). |
test_bbp_forum_visibility_posts_where_filter()
test_bbp_forum_visibility_posts_where_filter()
test_bbp_forum_visibility_where_for_user_with_access()
test_bbp_forum_visibility_where_for_user_with_access()
test_bbp_forum_visibility_where_preserves_custom_post_types()
test_bbp_forum_visibility_where_preserves_custom_post_types()
test_bbp_forum_visibility_where_with_any_post_type()
test_bbp_forum_visibility_where_with_any_post_type()
test_bbp_forum_visibility_where_with_implicit_search_post_types()
test_bbp_forum_visibility_where_with_implicit_search_post_types()
test_bbp_forum_visibility_where_without_protected_forums()
test_bbp_forum_visibility_where_without_protected_forums()
test_bbp_get_excluded_forum_ids_ignores_non_countable_descendants()
test_bbp_get_excluded_forum_ids_ignores_non_countable_descendants()
test_bbp_get_excluded_forum_ids_includes_public_descendants_of_hidden_forum()
test_bbp_get_excluded_forum_ids_includes_public_descendants_of_hidden_forum()
test_bbp_get_excluded_forum_ids_includes_public_descendants_of_private_forum()
test_bbp_get_excluded_forum_ids_includes_public_descendants_of_private_forum()
test_bbp_get_forum_visibilities()
test_bbp_get_forum_visibilities()
| covers |
|
| todo |
Implement test_bbp_get_forum_visibilities(). |
test_bbp_get_hidden_forum_ids()
test_bbp_get_hidden_forum_ids()
| covers |
|
| todo |
Implement test_bbp_get_hidden_forum_ids(). |
test_bbp_get_private_forum_ids()
test_bbp_get_private_forum_ids()
| covers |
|
| todo |
Implement test_bbp_get_private_forum_ids(). |
test_bbp_pre_get_posts_normalize_forum_visibility()
test_bbp_pre_get_posts_normalize_forum_visibility()
test_bbp_pre_get_posts_normalize_forum_visibility_ignores_non_bbp_post_types()
test_bbp_pre_get_posts_normalize_forum_visibility_ignores_non_bbp_post_types()
test_bbp_pre_get_posts_normalize_forum_visibility_with_mixed_forums_topics_and_posts()
test_bbp_pre_get_posts_normalize_forum_visibility_with_mixed_forums_topics_and_posts()
test_bbp_pre_get_posts_normalize_forum_visibility_with_mixed_post_types()
test_bbp_pre_get_posts_normalize_forum_visibility_with_mixed_post_types()
test_bbp_pre_get_posts_normalize_forum_visibility_with_suppressed_filters()
test_bbp_pre_get_posts_normalize_forum_visibility_with_suppressed_filters()
test_bbp_repair_forum_visibility()
test_bbp_repair_forum_visibility()
| covers |
|
| todo |
Implement test_bbp_repair_forum_visibility(). |
test_descendant_forum_moderator_can_read_descendant_of_hidden_parent()
test_descendant_forum_moderator_can_read_descendant_of_hidden_parent()
test_explicit_forum_id_query_excludes_restricted_forums()
test_explicit_forum_id_query_excludes_restricted_forums()
test_explicit_forum_id_query_includes_readable_forums()
test_explicit_forum_id_query_includes_readable_forums()
test_filtered_forum_moderator_is_removed_from_excluded_forums()
test_filtered_forum_moderator_is_removed_from_excluded_forums()
test_keymaster_can_read_public_descendants_of_hidden_forum()
test_keymaster_can_read_public_descendants_of_hidden_forum()
test_parent_forum_moderator_can_read_public_descendants_of_hidden_forum()
test_parent_forum_moderator_can_read_public_descendants_of_hidden_forum()
test_participant_can_read_public_descendants_of_private_forum()
test_participant_can_read_public_descendants_of_private_forum()
test_participant_cannot_read_public_descendants_of_hidden_forum()
test_participant_cannot_read_public_descendants_of_hidden_forum()
test_public_forum_tree_remains_readable()
test_public_forum_tree_remains_readable()
test_query_excludes_content_in_public_descendants_of_hidden_forum()
test_query_excludes_content_in_public_descendants_of_hidden_forum()
test_query_excludes_content_in_public_descendants_of_private_forum()
test_query_excludes_content_in_public_descendants_of_private_forum()
test_query_includes_descendant_content_for_parent_forum_moderator()
test_query_includes_descendant_content_for_parent_forum_moderator()
Create a restricted forum with public descendants and content.
create_inherited_visibility_test_posts(string $status = 'hidden') : array<mixed,integer>
Parameters
$status
stringParent forum status.
Returns
array<mixed,integer>Forum, topic, and reply IDs.
Create public, private, and hidden forum content for visibility tests.
create_visibility_test_posts() : array<mixed,integer>
Returns
array<mixed,integer>Forum, topic, and reply IDs keyed by visibility.
Properties
$cached_SERVER_NAME
$cached_SERVER_NAME
Static