From e76be26406cb5efa18a28bfa3785e61029a88e77 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 11 Dec 2015 11:06:28 +0000 Subject: [PATCH] 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 git-svn-id: https://develop.svn.wordpress.org/trunk@35863 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/capabilities.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index 1c3cefd4ca..12834867b9 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -117,6 +117,12 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'level_1' => array( 'administrator', 'editor', 'author', 'contributor' ), 'level_0' => array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ), + 'administrator' => array( 'administrator' ), + 'editor' => array( 'editor' ), + 'author' => array( 'author' ), + 'contributor' => array( 'contributor' ), + 'subscriber' => array( 'subscriber' ), + ); } @@ -200,6 +206,12 @@ class Tests_User_Capabilities extends WP_UnitTestCase { 'level_1' => array( 'administrator', 'editor', 'author', 'contributor' ), 'level_0' => array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' ), + 'administrator' => array( 'administrator' ), + 'editor' => array( 'editor' ), + 'author' => array( 'author' ), + 'contributor' => array( 'contributor' ), + 'subscriber' => array( 'subscriber' ), + ); }