Opened 14 years ago
Closed 14 years ago
#21742 closed enhancement (fixed)
Allow unit tests to override is_*_admin()
| Reported by: | ryan | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Unit Tests | Version: | 3.4.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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)
#3
@
14 years ago
- Resolution fixed
- Status closed → reopened
Missing dashboard widgets: http://cl.ly/J9gm
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Rough take on using WP_Screen