BuddyPress Group Forum permission tests.

group extend
group buddypress
group groups
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_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_group_admin_can_change_forum_attributes_but_not_parent()

test_group_admin_can_change_forum_attributes_but_not_parent() 
covers
covers
covers

test_group_admin_cannot_change_unattached_forum_attributes()

test_group_admin_cannot_change_unattached_forum_attributes() 
covers
covers
covers

test_group_context_does_not_map_caps_for_another_group_forum()

test_group_context_does_not_map_caps_for_another_group_forum() 
covers

test_group_forum_access_preserves_ancestor_restrictions()

test_group_forum_access_preserves_ancestor_restrictions() 
covers
covers
covers

test_group_forum_access_preserves_moderator_and_inactive_user_semantics()

test_group_forum_access_preserves_moderator_and_inactive_user_semantics() 
covers
covers

test_group_forum_subscription_users_require_current_access()

test_group_forum_subscription_users_require_current_access() 
covers
covers

test_group_moderator_cannot_change_forum_parent_or_attributes()

test_group_moderator_cannot_change_forum_parent_or_attributes() 
covers
covers
covers

test_restricted_group_forum_access_outside_group_context()

test_restricted_group_forum_access_outside_group_context() 
covers
covers
covers

attach_forum_to_group()

attach_forum_to_group($forum_id, $group_id) 

Parameters

$forum_id

$group_id

set_group_context()

set_group_context($group_id, $user_id) 

Parameters

$group_id

$user_id

submit_forum_edit()

submit_forum_edit($forum_id, $parent_id) 

Parameters

$forum_id

$parent_id

 Properties

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static
 

$group_extension

$group_extension 

Default

 

$old_allow_forum_mods

$old_allow_forum_mods 

Default

 

$old_errors

$old_errors 

Default

 

$old_post

$old_post 

Default

 

$old_request

$old_request 

Default

 

$old_server

$old_server 

Default