Skip to content

Unit Testing #890

@tw2113

Description

@tw2113

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions