Tests for bbPress REST API integration.
| group | common |
|---|---|
| group | rest |
| package | bbPress |
| inherited_from | \BBP_UnitTestCase |
assertPreConditions()
clean_up_global_scope()
commit_transaction()
data_forum_attribute_fields() : array<mixed,array>
array<mixed,array>Field names.enable_rest_support(array $args) : array
arrayPost type arguments.
arrayFiltered post type arguments.go_to($url)
grant_super_admin($user_id)
setUp()
| inherited_from | \BBP_UnitTestCase::setUp() |
|---|
setUp()
setUpBeforeClass()
setUp_wp_mail($args)
set_current_user($user_id)
set_permalink_structure(string $structure = '')
| since | 2.6.0 bbPress (r5947) |
|---|---|
| global | WP_Rewrite $wp_rewrite |
stringOptional. Permalink structure to set. Default empty.
tearDown()
| inherited_from | \BBP_UnitTestCase::tearDown() |
|---|
tearDown()
tearDown_wp_mail($args)
test_anonymous_user_can_read_public_forum_content()
| covers |
|---|
test_anonymous_user_cannot_read_hidden_forum_content()
| covers |
|---|
test_anonymous_user_cannot_read_private_forum_content()
| covers |
|---|
test_anonymous_user_cannot_read_public_descendants_of_hidden_forum()
| covers |
|---|
test_collections_exclude_public_descendants_of_hidden_forum()
| covers |
|---|
test_filtered_forum_moderator_can_read_hidden_forum_content()
| covers |
|---|
test_forum_moderator_can_read_hidden_forum_content()
| covers |
|---|
test_global_moderator_can_change_forum_structure_through_rest()
| covers |
|---|
test_keymaster_can_read_hidden_forum_content()
| covers |
|---|
test_parent_forum_moderator_can_read_public_descendants_of_hidden_forum()
| covers |
|---|
test_participant_can_read_private_forum_content()
| covers |
|---|
test_participant_can_read_public_descendants_of_private_forum()
| covers |
|---|
test_participant_cannot_access_rest_edit_surfaces_after_topic_moves_to_hidden_forum()
| covers | |
|---|---|
| covers | |
| covers |
test_participant_cannot_read_hidden_forum_content()
| covers |
|---|
test_participant_cannot_read_public_descendants_of_hidden_forum()
| covers |
|---|
test_per_forum_moderator_cannot_change_forum_structure_through_rest(string $field)
| covers | |
|---|---|
| dataProvider | data_forum_attribute_fields |
stringField to update.
test_search_excludes_restricted_forum_content()
| covers |
|---|
assert_item_status(integer $status, array<mixed,integer> $posts, integer $user_id = 0)
integerExpected HTTP status.
array<mixed,integer>Forum, topic, and reply IDs.
integerUser ID.
create_forum_content(string $status= 'publish', integer $parent_id= 0) : array<mixed,integer>
stringForum status.
integerParent forum ID.
array<mixed,integer>Forum, topic, and reply IDs.dispatch_request(string $method, string $route, integer $user_id= 0, array $params= array()) : \WP_REST_Response
stringHTTP method.
stringREST route.
integerUser ID.
arrayRequest parameters.
\WP_REST_ResponseREST response.get_item(string $post_type, integer $post_id, integer $user_id = 0) : \WP_REST_Response
stringPost type route base.
integerPost ID.
integerUser ID.
\WP_REST_ResponseREST response.get_items(string $post_type, integer $user_id = 0) : \WP_REST_Response
stringPost type route base.
integerUser ID.
\WP_REST_ResponseREST response.update_item(string $post_type, integer $post_id, integer $user_id, array $params) : \WP_REST_Response
stringPost type route base.
integerPost ID.
integerUser ID.
arrayRequest parameters.
\WP_REST_ResponseREST response.$cached_SERVER_NAME
null