WP_Test_REST_Comments_Controller S

Total Complexity 49
Dependencies 2
Dependents 0
Total lines 944
Lines of code 750
Logical lines of code 459
Comment lines 11
Methods 46
Properties 6

Methods 46

Method Rating Maintainability Complexity Lines of code
test_get_comments_pagination_headers()
S
42 2 59
check_comment_data()
S
50 3 28
test_get_additional_field_registration()
S
46 1 39
test_update_item()
S
49 1 31
test_create_comment_two_times()
S
51 1 30
test_create_item_current_user()
S
50 1 28
test_create_comment_without_type()
S
51 1 27
test_create_item_assign_different_user()
S
52 1 25
setUp()
S
54 1 24
test_create_item_duplicate()
S
53 1 24
test_get_item_schema()
S
53 1 24
test_update_comment_field_does_not_use_default_values()
S
53 1 22
test_create_item()
S
54 1 21
test_create_comment_with_status()
S
54 1 20
test_update_comment_status()
S
54 1 20
test_create_comment_other_user()
S
55 1 19
test_create_comment_karma_without_permission()
S
56 1 18
test_create_comment_status_without_permission()
S
56 1 18
test_create_comment_other_user_without_permission()
S
56 1 17
test_update_comment_date_gmt()
S
57 1 16
test_delete_item_skip_trash()
S
57 1 16
test_get_items_for_post_type()
S
58 1 15
test_get_items_for_post_author()
S
58 1 15
test_get_items_for_post_slug()
S
58 1 15
test_create_comment_closed()
S
58 1 15
test_delete_item()
S
58 1 15
test_get_items_for_post()
S
61 1 12
test_prepare_item()
S
62 1 11
test_update_comment_invalid_type()
S
62 1 11
test_update_comment_invalid_id()
S
62 1 11
test_update_comment_invalid_permission()
S
62 1 11
tearDown()
S
81 1 3
test_register_routes()
S
68 1 7
test_get_items()
S
66 1 8
test_get_items_no_permission()
S
67 1 7
test_get_item()
S
67 1 7
test_get_comment_author_avatar_urls()
S
62 1 10
test_get_comment_invalid_id()
S
71 1 5
test_get_comment_invalid_context()
S
69 1 6
test_get_comment_invalid_post_id()
S
64 1 9
test_get_comment_not_approved()
S
69 1 6
test_get_comment_not_approved_same_user()
S
69 1 6
test_delete_comment_invalid_id()
S
67 1 7
test_delete_comment_without_permission()
S
69 1 6
additional_field_get_callback()
S
78 1 3
additional_field_update_callback()
S
79 1 3