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

See #38191


git-svn-id: https://develop.svn.wordpress.org/trunk@38802 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-10-16 23:35:33 +00:00
parent 6cccdf89ee
commit d3dd6046d5

View File

@ -285,13 +285,17 @@ class Tests_User_Capabilities extends WP_UnitTestCase {
// test the tests // test the tests
function test_single_and_multisite_cap_tests_match() { function test_single_and_multisite_cap_tests_match() {
$single = $this->_getSingleSitePrimitiveCaps(); $single_primitive = array_keys( $this->_getSingleSitePrimitiveCaps() );
$multi = $this->_getMultiSitePrimitiveCaps(); $multi_primitive = array_keys( $this->_getMultiSitePrimitiveCaps() );
$this->assertEquals( array_keys( $single ), array_keys( $multi ) ); sort( $single_primitive );
sort( $multi_primitive );
$this->assertEquals( $single_primitive, $multi_primitive );
$single = $this->_getSingleSiteMetaCaps(); $single_meta = array_keys( $this->_getSingleSiteMetaCaps() );
$multi = $this->_getMultiSiteMetaCaps(); $multi_meta = array_keys( $this->_getMultiSiteMetaCaps() );
$this->assertEquals( array_keys( $single ), array_keys( $multi ) ); sort( $single_meta );
sort( $multi_meta );
$this->assertEquals( $single_meta, $multi_meta );
} }
// test the tests // test the tests