Changeset 56548 for trunk/tests/phpunit/tests/user/capabilities.php
- Timestamp:
- 09/08/2023 10:01:14 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/user/capabilities.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/capabilities.php
r55562 r56548 67 67 // Keep track of users we create. 68 68 $this->flush_roles(); 69 70 69 } 71 70 … … 183 182 184 183 ); 185 186 184 } 187 185 … … 266 264 267 265 ); 268 269 266 } 270 267 … … 454 451 455 452 } 456 457 453 } 458 454 … … 748 744 update_option( 'link_manager_enabled', '0' ); 749 745 $this->assertSame( '0', get_option( 'link_manager_enabled' ) ); 750 751 746 } 752 747 … … 762 757 $this->assertFalse( user_can( $user, 'unfiltered_upload' ), "User with the {$role} role should not have the unfiltered_upload capability" ); 763 758 } 764 765 759 } 766 760 … … 918 912 // User should have one role now. 919 913 $this->assertSame( array( 'subscriber' ), $user->roles ); 920 921 914 } 922 915 … … 1038 1031 $this->flush_roles(); 1039 1032 $this->assertFalse( $wp_roles->is_role( $role_name ) ); 1040 1041 1033 } 1042 1034 … … 1083 1075 $this->flush_roles(); 1084 1076 $this->assertFalse( $wp_roles->is_role( $role_name ) ); 1085 1086 1077 } 1087 1078 … … 1122 1113 } 1123 1114 } 1124 1125 1115 } 1126 1116 … … 1154 1144 $this->assertFalse( $user_1->has_cap( 'publish_posts' ) ); 1155 1145 $this->assertFalse( $user_2->has_cap( 'publish_posts' ) ); 1156 1157 1146 } 1158 1147 … … 1218 1207 // User level should be empty. 1219 1208 $this->assertEmpty( $user->user_level ); 1220 1221 1209 } 1222 1210 … … 1548 1536 ); 1549 1537 } 1550 1551 1538 } 1552 1539 … … 1851 1838 $this->assertFalse( user_can( $contributor->ID, 'edit_post', $post->ID ) ); 1852 1839 $this->assertFalse( user_can( $contributor->ID, 'delete_post', $post->ID ) ); 1853 1854 1840 } 1855 1841 … … 1982 1968 1983 1969 _unregister_post_type( 'page_capability' ); 1984 1985 1970 } 1986 1971 … … 2012 1997 2013 1998 $this->assertSame( 0, get_current_user_id() ); 2014 2015 1999 } 2016 2000
Note: See TracChangeset
for help on using the changeset viewer.