From ec49d4d3d146c3aa8c8bbaca97b7913c5e79361e Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 30 Sep 2016 22:10:27 +0000 Subject: [PATCH] Role/Capability: Correct some meta capabilities that were incorrectly listed as primitive capabilities in the role and capability tests. See #38191 git-svn-id: https://develop.svn.wordpress.org/trunk@38696 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/capabilities.php | 35 ++++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index 48de8899b9..cd57e6cef0 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -53,15 +53,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'unfiltered_html' => array( 'administrator', 'editor' ), - 'create_sites' => array(), - 'delete_sites' => array(), - 'manage_network' => array(), - 'manage_sites' => array(), - 'manage_network_users' => array(), - 'manage_network_plugins' => array(), - 'manage_network_themes' => array(), - 'manage_network_options' => array(), - 'activate_plugins' => array( 'administrator' ), 'create_users' => array( 'administrator' ), 'delete_plugins' => array( 'administrator' ), @@ -141,14 +132,6 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'unfiltered_html' => array(), - 'create_sites' => array(), - 'delete_sites' => array(), - 'manage_network' => array(), - 'manage_sites' => array(), - 'manage_network_users' => array(), - 'manage_network_plugins' => array(), - 'manage_network_themes' => array(), - 'manage_network_options' => array(), 'activate_plugins' => array(), 'create_users' => array(), 'delete_plugins' => array(), @@ -226,6 +209,15 @@ class Tests_User_Capabilities extends WP_UnitTestCase { final private function _getSingleSiteMetaCaps() { return array( + 'create_sites' => array(), + 'delete_sites' => array(), + 'manage_network' => array(), + 'manage_sites' => array(), + 'manage_network_users' => array(), + 'manage_network_plugins' => array(), + 'manage_network_themes' => array(), + 'manage_network_options' => array(), + 'upload_plugins' => array( 'administrator' ), 'upload_themes' => array( 'administrator' ), 'customize' => array( 'administrator' ), @@ -236,8 +228,17 @@ class Tests_User_Capabilities extends WP_UnitTestCase { final private function _getMultiSiteMetaCaps() { return array( + 'create_sites' => array(), + 'delete_sites' => array(), + 'manage_network' => array(), + 'manage_sites' => array(), + 'manage_network_users' => array(), + 'manage_network_plugins' => array(), + 'manage_network_themes' => array(), + 'manage_network_options' => array(), 'upload_plugins' => array(), 'upload_themes' => array(), + 'customize' => array( 'administrator' ), 'delete_site' => array( 'administrator' ), 'add_users' => array( 'administrator' ),