Changeset 38860 for trunk/tests/phpunit/tests/user/capabilities.php
- Timestamp:
- 10/21/2016 01:46:50 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/capabilities.php
r38829 r38860 1335 1335 } 1336 1336 1337 function test_multisite_user_can_edit_self() { 1338 if ( ! is_multisite() ) { 1339 $this->markTestSkipped( 'Test only runs in multisite' ); 1340 return; 1341 } 1342 1343 $user = self::$users['administrator']; 1344 1345 wp_set_current_user( $user->ID ); 1346 1347 $this->assertTrue( current_user_can( 'edit_user', $user->ID ) ); 1337 function test_user_can_edit_self() { 1338 foreach ( self::$users as $role => $user ) { 1339 wp_set_current_user( $user->ID ); 1340 $this->assertTrue( current_user_can( 'edit_user', $user->ID ), "User with role {$role} should have the capability to edit their own profile" ); 1341 } 1348 1342 } 1349 1343
Note: See TracChangeset
for help on using the changeset viewer.