[wp-trac] [WordPress Trac] #38433: Complete test coverage for current_user_can_for_blog()

WordPress Trac noreply at wordpress.org
Sat Apr 20 21:08:00 UTC 2019


#38433: Complete test coverage for current_user_can_for_blog()
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Role/Capability                      |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests needs-patch good-   |     Focuses:
  first-bug                                      |
-------------------------------------------------+-------------------------

Comment (by santilinwp):

 Replying to [ticket:38433 johnbillion]:

 I have been looking into the `Tests_User_Capabilities` class and found
 that there are 2 functions that test `current_user_can_for_blog`
 explicitly, while the rest use `current_user_can`.

 When you say

 > They should all be tested using `current_user_can_for_blog()`, too.

 Do you mean that all the calls to `current_user_can` should be changed
 into `current_user_can_for_blog`, or that we could add more tests and keep
 the ones that there are there yet?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38433#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list