[wp-trac] [WordPress Trac] #32687: Customizer Menus: Complete PHPUnit tests
WordPress Trac
noreply at wordpress.org
Sat Jul 4 05:26:50 UTC 2015
#32687: Customizer Menus: Complete PHPUnit tests
-------------------------------------+---------------------------
Reporter: designsimply | Owner: valendesigns
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 4.3
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------------
Changes (by valendesigns):
* keywords: needs-patch => has-patch needs-testing
* version: => trunk
Comment:
In [attachment:32687.diff] I moved the logic that was found in
`ajax_load_available_items` into a separate method named
`load_available_items_query`, which is much easier to unit test, and added
five tests that cover the expected return values of this new method. Plus
did a little variable and doc clean up in `search_available_items_query`
to make things consistent.
Additionally, I removed the incomplete `test_render_menu`, because
`WP_Customize_Nav_Menus::render_menu` is just untestable.
These changes should theoretically bring us to 100% coverage of
`WP_Customize_Nav_Menus`. Well, that is for the methods we can actually
test.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32687#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list