Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Testing #890

Open
tw2113 opened this issue Sep 13, 2022 · 0 comments
Open

Unit Testing #890

tw2113 opened this issue Sep 13, 2022 · 0 comments
Milestone

Comments

@tw2113
Copy link
Member

tw2113 commented Sep 13, 2022

I have various tickets in the issues around this, but this is going to be the list of functions that I believe we absolutely should get tests in place for.

Much preferring libraries and tools that allow us to control expected return values, and anything that won't rely on scaffolding up an entire database just to run anything. Thus why I'm preferring Brain Monkey or WP_Mock for the job.

What files/functions to test

  • admin UI class

custom-post-type-ui.php

  • cptui_register_single_post_type
  • cptui_register_single_taxonomy

inc/post-types.php

  • cptui_get_current_post_type
  • cptui_delete_post_type
  • cptui_update_post_type
  • cptui_filtered_post_type_post_global

inc/taxonmies.php

  • cptui_get_current_taxonomy
  • cptui_delete_taxonomy
  • cptui_update_taxonomy
  • cptui_filtered_taxonomy_post_global

inc/tools.php

  • cptui_import_types_taxes_settings
  • cptui_do_import_types_taxes

inc/utility.php

  • get_disp_boolean
  • disp_boolean
  • cptui_admin_notices_helper
  • cptui_get_object_from_post_global
  • cptui_post_type_supports
@tw2113 tw2113 added this to the 2.0.0 milestone Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant