Tests for bbPress XML-RPC integration.

group common
group xmlrpc
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

Data provider for forum attribute fields exposed by XML-RPC.

data_forum_attribute_fields() : array<mixed,array>

Returns

array<mixed,array>Field names.

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

Set up XML-RPC and a participant.

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

Remove XML-RPC test filters.

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

test_blog_post_edit_is_unchanged() 
covers

test_keymaster_can_change_forum_structure_through_xmlrpc()

test_keymaster_can_change_forum_structure_through_xmlrpc() 
covers

test_keymaster_cannot_bypass_topic_move_lifecycle()

test_keymaster_cannot_bypass_topic_move_lifecycle() 
covers

test_moderation_holds_reply_edit_for_review()

test_moderation_holds_reply_edit_for_review() 
covers

test_moderation_holds_topic_edit_for_review()

test_moderation_holds_topic_edit_for_review() 
covers

test_participant_can_edit_topic_content_in_open_forum()

test_participant_can_edit_topic_content_in_open_forum() 
covers

test_participant_can_restore_allowed_topic_revision()

test_participant_can_restore_allowed_topic_revision() 
covers

test_participant_cannot_change_reply_order()

test_participant_cannot_change_reply_order() 
covers

test_participant_cannot_change_topic_status()

test_participant_cannot_change_topic_status() 
covers

test_participant_cannot_create_duplicate_topics()

test_participant_cannot_create_duplicate_topics() 
coversNothing

test_participant_cannot_create_topic()

test_participant_cannot_create_topic() 
coversNothing

test_participant_cannot_delete_topic()

test_participant_cannot_delete_topic() 
coversNothing

test_participant_cannot_edit_topic_in_closed_forum()

test_participant_cannot_edit_topic_in_closed_forum() 
covers

test_participant_cannot_move_reply_to_closed_topic()

test_participant_cannot_move_reply_to_closed_topic() 
covers

test_participant_cannot_move_topic_to_closed_forum()

test_participant_cannot_move_topic_to_closed_forum() 
covers

test_participant_cannot_restore_topic_revision()

test_participant_cannot_restore_topic_revision() 
coversNothing

test_per_forum_moderator_cannot_change_forum_structure_through_xmlrpc()

test_per_forum_moderator_cannot_change_forum_structure_through_xmlrpc(string $field) 
covers
dataProvider data_forum_attribute_fields

Parameters

$field

string

Field to update.

test_strict_moderation_rejects_topic_edit()

test_strict_moderation_rejects_topic_edit() 
covers

test_topic_edit_requires_title_and_content()

test_topic_edit_requires_title_and_content() 
covers

Create a per-forum moderator with XML-RPC credentials.

create_forum_moderator(integer $forum_id) : integer

Parameters

$forum_id

integer

Forum ID.

Returns

integerUser ID.

Create a keymaster with XML-RPC credentials.

create_keymaster() : integer

Returns

integerUser ID.

Create a participant with XML-RPC credentials.

create_participant() : integer

Returns

integerUser ID.

Edit a post through the XML-RPC wp.editPost method.

edit_post(integer $post_id, array $data) : true | \IXR_Error

Parameters

$post_id

integer

Post ID.

$data

array

Post fields.

Returns

true\IXR_ErrorResult.

Create a post through the XML-RPC wp.newPost method.

new_post(array $data) : string | \IXR_Error

Parameters

$data

array

Post fields.

Returns

string\IXR_ErrorResult.

 Properties

 

$cached_SERVER_NAME

$cached_SERVER_NAME 

Default

null
Static
 

$password

$password 

Default

'bbp-password'
 

Participant credentials.

$username : string

Default

'bbp-participant'
 

XML-RPC server instance.

$xmlrpc_server : \wp_xmlrpc_server

Default