Make WordPress Core

Changeset 35863


Ignore:
Timestamp:
12/11/2015 11:06:28 AM (8 years ago)
Author:
johnbillion
Message:

Add assertions for role names as capabilities in the capabilities tests. This ensures the role name is only available as a capability to the corresponding role.

See #35007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/capabilities.php

    r35747 r35863  
    118118            'level_0'                => array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ),
    119119
     120            'administrator'          => array( 'administrator' ),
     121            'editor'                 => array( 'editor' ),
     122            'author'                 => array( 'author' ),
     123            'contributor'            => array( 'contributor' ),
     124            'subscriber'             => array( 'subscriber' ),
     125
    120126        );
    121127
     
    201207            'level_0'                => array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ),
    202208
     209            'administrator'          => array( 'administrator' ),
     210            'editor'                 => array( 'editor' ),
     211            'author'                 => array( 'author' ),
     212            'contributor'            => array( 'contributor' ),
     213            'subscriber'             => array( 'subscriber' ),
     214
    203215        );
    204216
Note: See TracChangeset for help on using the changeset viewer.