Tests for user profile permissions.

group users
group capabilities
package bbPress
inherited_from \BBP_UnitTestCase

 Methods

add_test_contact_method()

add_test_contact_method($contact_methods) 

Parameters

$contact_methods

allow_all_forum_roles()

allow_all_forum_roles() 

assertPreConditions()

assertPreConditions() 
Inherited

clean_up_global_scope()

clean_up_global_scope() 
Inherited

Commit a MySQL transaction.

commit_transaction() 
InheritedStatic

deny_profile_field()

deny_profile_field($retval, $field) 

Parameters

$retval

$field

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

remap_edit_user_capability()

remap_edit_user_capability($caps, $cap) 

Parameters

$caps

$cap

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_email_confirmation_policy_distinguishes_self_and_moderator_edits()

test_email_confirmation_policy_distinguishes_self_and_moderator_edits() 

test_forum_role_handler_rejects_and_filters_staff_roles()

test_forum_role_handler_rejects_and_filters_staff_roles() 

test_password_field_filter_is_scoped_to_bbp_profile_editor()

test_password_field_filter_is_scoped_to_bbp_profile_editor() 

test_password_policy_respects_protected_targets_and_valid_users()

test_password_policy_respects_protected_targets_and_valid_users() 

test_profile_field_and_forum_role_policies_are_filterable()

test_profile_field_and_forum_role_policies_are_filterable() 

test_super_moderator_capabilities_are_scoped_to_the_profile_editor()

test_super_moderator_capabilities_are_scoped_to_the_profile_editor() 

test_super_moderator_capability_is_remappable()

test_super_moderator_capability_is_remappable() 

test_super_moderator_profile_field_defaults()

test_super_moderator_profile_field_defaults() 

test_user_edit_post_data_enforces_field_permissions()

test_user_edit_post_data_enforces_field_permissions() 

test_user_edit_post_data_removes_contact_methods_with_profile_fields()

test_user_edit_post_data_removes_contact_methods_with_profile_fields() 

test_wp_admin_user_permissions_remain_native()

test_wp_admin_user_permissions_remain_native() 

set_profile_editor()

set_profile_editor($user_id) 

Parameters

$user_id

set_profile_request()

set_profile_request($user_id, $forum_role) 

Parameters

$user_id

$forum_role

 Properties

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static
 

$allow_super_mods

$allow_super_mods 

Default

 

$request_method

$request_method 

Default