[wp-trac] [WordPress Trac] #21742: Allow unit tests to override is_*_admin()

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 30 18:01:36 UTC 2012


#21742: Allow unit tests to override is_*_admin()
-------------------------+-----------------------------
 Reporter:  ryan         |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Unit Tests   |    Version:  3.4.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Unit tests sometimes need to fake being in the user, network, or blog
 admin or on the front page. This is currently impossible due to the use of
 constants. A possible solution is to consult the current screen if it is
 setup and fallback to the constants otherwise. Alternatively, add filters
 in the is_*_admin() functions.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21742>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list