WP_Test_REST_Posts_Controller B

Total Complexity 82
Dependencies 1
Dependents 0
Total lines 1,181
Lines of code 918
Logical lines of code 625
Comment lines 26
Methods 75
Properties 0

Methods 75

Method Rating Maintainability Complexity Lines of code
test_get_item_links()
S
49 4 30
test_get_items_pagination_headers()
S
43 2 56
test_get_additional_field_registration()
S
47 1 38
test_get_items_status_without_permissions()
S
58 2 15
test_create_update_post_with_featured_image()
S
51 1 27
test_get_item_schema()
S
51 1 27
test_update_post_sticky()
S
54 1 23
test_update_item()
S
56 1 18
test_rest_update_post()
S
56 1 18
test_rest_update_post_raw()
S
55 1 18
test_create_post_draft()
S
57 1 17
test_create_post_with_password_without_permission()
S
57 1 16
test_create_post_private_without_permission()
S
58 1 15
tearDown()
S
70 2 7
error_insert_query()
S
70 2 6
setUp()
S
60 1 14
test_create_post_publish_without_permission()
S
59 1 14
test_create_post_custom_date()
S
58 1 14
test_create_post_custom_date_with_timezone()
S
58 1 14
test_get_item_links_no_author()
S
59 1 13
test_create_post_sticky()
S
60 1 13
test_create_post_private()
S
60 1 13
test_create_post_with_format()
S
60 1 13
test_create_post_with_db_error()
S
60 1 13
test_update_post_with_format()
S
60 1 13
test_update_post_slug()
S
60 1 13
test_delete_item_skip_trash()
S
59 1 13
test_create_post_without_permission()
S
61 1 12
test_update_post_without_extra_params()
S
61 1 12
test_update_post_without_permission()
S
61 1 12
test_delete_item()
S
60 1 12
test_create_post_sticky_as_contributor()
S
62 1 11
test_create_post_with_password()
S
62 1 11
test_create_post_with_falsy_password()
S
62 1 11
test_create_post_with_password_and_sticky_fails()
S
62 1 11
test_update_post_sticky_as_contributor()
S
62 1 11
test_update_post_with_password_and_sticky_fails()
S
62 1 11
test_update_stick_post_with_password_fails()
S
62 1 11
test_update_password_protected_post_with_sticky_fails()
S
62 1 11
test_register_routes()
S
68 1 7
test_get_items()
S
72 1 5
test_get_items_empty_query()
S
65 1 9
test_get_item()
S
71 1 5
test_get_post_without_permission()
S
64 1 9
test_get_post_invalid_id()
S
71 1 5
test_get_post_list_context_with_permission()
S
65 1 9
test_get_post_list_context_without_permission()
S
66 1 8
test_get_post_context_without_permission()
S
66 1 8
test_get_post_with_password()
S
65 1 9
test_get_post_with_password_without_permission()
S
66 1 8
test_prepare_item()
S
67 1 7
test_create_item()
S
65 1 9
test_rest_create_item()
S
65 1 9
test_create_post_invalid_id()
S
63 1 10
test_create_post_as_contributor()
S
64 1 10
test_create_post_other_author_without_permission()
S
63 1 10
test_create_post_invalid_status()
S
63 1 10
test_create_post_with_invalid_format()
S
63 1 10
test_create_post_invalid_author()
S
63 1 10
test_create_post_invalid_author_without_permission()
S
63 1 10
test_create_post_with_invalid_date()
S
63 1 10
test_create_post_with_invalid_date_gmt()
S
63 1 10
test_update_post_invalid_id()
S
69 1 6
test_update_post_invalid_route()
S
69 1 6
test_update_post_with_invalid_format()
S
63 1 10
test_update_post_excerpt()
S
63 1 10
test_update_post_empty_excerpt()
S
63 1 10
test_update_post_content()
S
63 1 10
test_update_post_empty_content()
S
63 1 10
test_delete_post_invalid_id()
S
69 1 6
test_delete_post_invalid_post_type()
S
67 1 7
test_delete_post_without_permission()
S
69 1 6
test_register_post_type_invalid_controller()
S
67 1 7
additional_field_get_callback()
S
78 1 3
additional_field_update_callback()
S
79 1 3