From f27fb3e91f311e548601e6ed4b287d4f9954acf7 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 21 Oct 2016 14:11:10 +0000 Subject: [PATCH] Role/Capability: Add tests for the `exist` user capability. See #38236 git-svn-id: https://develop.svn.wordpress.org/trunk@38861 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/capabilities.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index 91d539dd52..61caa76890 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -467,6 +467,9 @@ class Tests_User_Capabilities extends WP_UnitTestCase { $this->assertFalse( $user->has_cap( 'do_not_allow' ), "User with the {$role} role should not have the do_not_allow capability" ); $this->assertFalse( user_can( $user, 'do_not_allow' ), "User with the {$role} role should not have the do_not_allow capability" ); + + $this->assertTrue( $user->has_cap( 'exist' ), "User with the {$role} role should have the exist capability" ); + $this->assertTrue( user_can( $user, 'exist' ), "User with the {$role} role should have the exist capability" ); } // special case for the link manager