WordPress.org

Make WordPress Core

Changeset 38802


Ignore:
Timestamp:
10/16/16 23:35:33 (10 months ago)
Author:
johnbillion
Message:

Role/Capability: Disregard the order of capabilities when testing that single site and multisite capability tests match.

See #38191

File:
1 edited

Legend:

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

    r38769 r38802  
    286286    // test the tests 
    287287    function test_single_and_multisite_cap_tests_match() { 
    288         $single = $this->_getSingleSitePrimitiveCaps(); 
    289         $multi  = $this->_getMultiSitePrimitiveCaps(); 
    290         $this->assertEquals( array_keys( $single ), array_keys( $multi ) ); 
    291  
    292         $single = $this->_getSingleSiteMetaCaps(); 
    293         $multi  = $this->_getMultiSiteMetaCaps(); 
    294         $this->assertEquals( array_keys( $single ), array_keys( $multi ) ); 
     288        $single_primitive = array_keys( $this->_getSingleSitePrimitiveCaps() ); 
     289        $multi_primitive  = array_keys( $this->_getMultiSitePrimitiveCaps() ); 
     290        sort( $single_primitive ); 
     291        sort( $multi_primitive ); 
     292        $this->assertEquals( $single_primitive, $multi_primitive ); 
     293 
     294        $single_meta = array_keys( $this->_getSingleSiteMetaCaps() ); 
     295        $multi_meta  = array_keys( $this->_getMultiSiteMetaCaps() ); 
     296        sort( $single_meta ); 
     297        sort( $multi_meta ); 
     298        $this->assertEquals( $single_meta, $multi_meta ); 
    295299    } 
    296300 
Note: See TracChangeset for help on using the changeset viewer.