[Wp-unit-tests] [WordPress Unit Tests] #41: Ajax dashboard unit test

WordPress Unit Tests noreply at wordpress.org
Tue Jun 5 00:17:28 UTC 2012

#41: Ajax dashboard unit test
 Reporter:  kurtpayne                 |      Owner:
     Type:  enhancement               |     Status:  new
 Priority:  major                     |  Milestone:  Add new tests
Component:  Capabilities              |    Version:
 Keywords:  ajax, dashboard, widgets  |
 I'm trying to write a unit test for `wp_ajax_dashboard_widgets` but the
 core calls `require` on dashboard.php.  This means if
 `wp_ajax_dashboard_widgets()` is called twice, a php fatal error occurs.

 I wanted to bring this up in the unit test trac before opening a ticket in
 the core trac.  The only use case for "fixing" this is unit testing.

 Any thoughts on how to proceed?

 1.) Submit a core ticket (use require_once)
 2.) Test this feature only once, notate, move on
 3.) Skip unit test
 4.) ???

Ticket URL: <https://unit-test.trac.wordpress.org/ticket/41>
WordPress Unit Tests <https://unit-test.trac.wordpress.org>
My example project

More information about the wp-unit-tests mailing list