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
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
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
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.
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
test_blog_post_edit_is_unchanged()
test_blog_post_edit_is_unchanged()
test_keymaster_can_change_forum_structure_through_xmlrpc()
test_keymaster_can_change_forum_structure_through_xmlrpc()
test_keymaster_cannot_bypass_topic_move_lifecycle()
test_keymaster_cannot_bypass_topic_move_lifecycle()
test_moderation_holds_reply_edit_for_review()
test_moderation_holds_reply_edit_for_review()
test_moderation_holds_topic_edit_for_review()
test_moderation_holds_topic_edit_for_review()
test_participant_can_edit_topic_content_in_open_forum()
test_participant_can_edit_topic_content_in_open_forum()
test_participant_can_restore_allowed_topic_revision()
test_participant_can_restore_allowed_topic_revision()
test_participant_cannot_change_reply_order()
test_participant_cannot_change_reply_order()
test_participant_cannot_change_topic_status()
test_participant_cannot_change_topic_status()
test_participant_cannot_create_duplicate_topics()
test_participant_cannot_create_duplicate_topics()
test_participant_cannot_create_topic()
test_participant_cannot_create_topic()
test_participant_cannot_delete_topic()
test_participant_cannot_delete_topic()
test_participant_cannot_edit_topic_in_closed_forum()
test_participant_cannot_edit_topic_in_closed_forum()
test_participant_cannot_move_reply_to_closed_topic()
test_participant_cannot_move_reply_to_closed_topic()
test_participant_cannot_move_topic_to_closed_forum()
test_participant_cannot_move_topic_to_closed_forum()
test_participant_cannot_restore_topic_revision()
test_participant_cannot_restore_topic_revision()
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
stringField to update.
test_strict_moderation_rejects_topic_edit()
test_strict_moderation_rejects_topic_edit()
test_topic_edit_requires_title_and_content()
test_topic_edit_requires_title_and_content()
Create a per-forum moderator with XML-RPC credentials.
create_forum_moderator(integer $forum_id) : integer
Parameters
$forum_id
integerForum ID.
Returns
integerUser ID.
Create a keymaster with XML-RPC credentials.
create_keymaster() : integer
Create a participant with XML-RPC credentials.
create_participant() : integer
Edit a post through the XML-RPC wp.editPost method.
edit_post(integer $post_id, array $data) : true | \IXR_Error
Parameters
Returns
true\IXR_ErrorResult.
Create a post through the XML-RPC wp.newPost method.
new_post(array $data) : string | \IXR_Error
Parameters
Returns
string\IXR_ErrorResult.
Properties
$cached_SERVER_NAME
$cached_SERVER_NAME
Static
Participant credentials.
$username : string
Default
'bbp-participant'
XML-RPC server instance.
$xmlrpc_server : \wp_xmlrpc_server