Opened 9 months ago
Closed 9 months ago
#21742 closed enhancement (fixed)
Allow unit tests to override is_*_admin()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Unit Tests | Version: | 3.4.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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.
Attachments (6)
Change History (11)
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [21687]:
comment:2
SergeyBiryukov — 9 months ago
- Milestone changed from Awaiting Review to 3.5
- Resolution fixed deleted
- Status changed from closed to reopened
Missing dashboard widgets: http://cl.ly/J9gm
Note: See
TracTickets for help on using
tickets.

Rough take on using WP_Screen