Tests for reply handler permissions.

group replies
group functions
group capabilities
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

filter_remove_topic_tag_caps()

filter_remove_topic_tag_caps($caps, $cap, $user_id, $args) 

Parameters

$caps

$cap

$user_id

$args

filter_reply_edit_redirect()

filter_reply_edit_redirect($location) 

Parameters

$location

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_from \BBP_UnitTestCase::setUp()

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_from \BBP_UnitTestCase::tearDown()

tearDown()

tearDown() 
Inherited

Tear down globals set up in setUp_wp_mail()

tearDown_wp_mail($args) 
InheritedStatic

Parameters

$args

test_anonymous_user_can_read_public_forum_topic_and_reply()

test_anonymous_user_can_read_public_forum_topic_and_reply() 
covers
covers
covers

test_anonymous_user_cannot_remove_topic_tags_without_capability()

test_anonymous_user_cannot_remove_topic_tags_without_capability() 
covers

test_anonymous_user_cannot_spoof_forum_id_to_reply_to_private_topic()

test_anonymous_user_cannot_spoof_forum_id_to_reply_to_private_topic() 
covers

test_malformed_topic_tag_input_preserves_existing_tags()

test_malformed_topic_tag_input_preserves_existing_tags() 
covers

test_moderator_can_convert_reply_to_topic()

test_moderator_can_convert_reply_to_topic() 
covers

test_moderator_can_move_reply_into_another_users_topic()

test_moderator_can_move_reply_into_another_users_topic() 
covers

test_participant_can_remove_topic_tags_when_replying()

test_participant_can_remove_topic_tags_when_replying() 
covers
covers

test_participant_can_submit_reply_when_forum_id_matches_topic()

test_participant_can_submit_reply_when_forum_id_matches_topic() 
covers

test_participant_cannot_convert_reply_to_topic_with_long_title()

test_participant_cannot_convert_reply_to_topic_with_long_title() 
covers

test_participant_cannot_convert_reply_when_source_topic_cannot_be_edited()

test_participant_cannot_convert_reply_when_source_topic_cannot_be_edited() 
covers

test_participant_cannot_move_reply_into_another_users_topic()

test_participant_cannot_move_reply_into_another_users_topic() 
covers

test_participant_cannot_spoof_forum_id_to_reply_below_hidden_forum()

test_participant_cannot_spoof_forum_id_to_reply_below_hidden_forum() 
covers

test_participant_cannot_spoof_forum_id_to_reply_to_hidden_topic()

test_participant_cannot_spoof_forum_id_to_reply_to_hidden_topic() 
covers

test_participant_cannot_submit_reply_to_private_topic()

test_participant_cannot_submit_reply_to_private_topic() 
covers

test_topic_tag_removal_can_be_filtered_per_term()

test_topic_tag_removal_can_be_filtered_per_term() 
covers
covers
covers

get_reply_ids()

get_reply_ids($topic_id) 

Parameters

$topic_id

submit_reply()

submit_reply($topic_id, $forum_id = null, $content = '', $anonymous_data = array()) 

Parameters

$topic_id

$forum_id

$content

$anonymous_data

submit_reply_edit()

submit_reply_edit($reply_id, $content = '', $post_data = array()) 

Parameters

$reply_id

$content

$post_data

submit_reply_move()

submit_reply_move($reply_id, $move_option, $destination_topic_id = 0, $destination_title = null) 

Parameters

$reply_id

$move_option

$destination_topic_id

$destination_title

 Properties

 

$blocked_topic_tag_id

$blocked_topic_tag_id 

Default

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static
 

$old_allow_anonymous

$old_allow_anonymous 

Default

 

$old_allow_content_throttle

$old_allow_content_throttle 

Default

 

$old_errors

$old_errors 

Default

 

$old_post

$old_post 

Default

 

$old_request

$old_request 

Default

 

$old_server

$old_server 

Default