Changeset 64484
- Timestamp:
- 10/18/2026 12:24:57 AM (7 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r64233 r64484 657 657 wp_set_current_user( self::$user ); 658 658 659 $id1 = self:: factory()->user->create();660 $id2 = self:: factory()->user->create();659 $id1 = self::$author; 660 $id2 = self::$subscriber; 661 661 662 662 $request = new WP_REST_Request( 'GET', '/wp/v2/users' ); … … 692 692 wp_set_current_user( self::$user ); 693 693 694 $id1 = self:: factory()->user->create();695 $id2 = self:: factory()->user->create();694 $id1 = self::$subscriber; 695 $id2 = self::$author; 696 696 697 697 $request = new WP_REST_Request( 'GET', '/wp/v2/users' ); … … 1090 1090 1091 1091 public function test_get_item() { 1092 $user_id = self:: factory()->user->create();1092 $user_id = self::$subscriber; 1093 1093 1094 1094 wp_set_current_user( self::$user ); … … 1243 1243 1244 1244 public function test_get_item_published_author_post() { 1245 $author_id = self::factory()->user->create( 1246 array( 1247 'role' => 'author', 1248 ) 1249 ); 1245 $author_id = self::$author; 1250 1246 1251 1247 $post_id = self::factory()->post->create( … … 1263 1259 1264 1260 public function test_get_item_published_author_pages() { 1265 $author_id = self::factory()->user->create( 1266 array( 1267 'role' => 'author', 1268 ) 1269 ); 1261 $author_id = self::$author; 1270 1262 1271 1263 wp_set_current_user( 0 ); … … 1287 1279 1288 1280 public function test_get_user_with_edit_context() { 1289 $user_id = self:: factory()->user->create();1281 $user_id = self::$subscriber; 1290 1282 1291 1283 $this->allow_user_to_manage_multisite(); … … 1298 1290 1299 1291 public function test_get_item_published_author_wrong_context() { 1300 $author_id = self::factory()->user->create( 1301 array( 1302 'role' => 'author', 1303 ) 1304 ); 1292 $author_id = self::$author; 1305 1293 1306 1294 $post_id = self::factory()->post->create( … … 2184 2172 */ 2185 2173 public function test_update_item_only_roles_as_editor() { 2186 $user_id = self::factory()->user->create( 2187 array( 2188 'role' => 'author', 2189 ) 2190 ); 2174 $user_id = self::$author; 2191 2175 2192 2176 wp_set_current_user( self::$editor ); … … 2596 2580 2597 2581 public function test_delete_user_without_permission() { 2598 $user_id = self:: factory()->user->create();2582 $user_id = self::$subscriber; 2599 2583 2600 2584 $this->allow_user_to_manage_multisite(); … … 3317 3301 */ 3318 3302 public function test_head_request_with_specified_fields_returns_success_response( $path ) { 3319 $user_id = self:: factory()->user->create();3303 $user_id = self::$subscriber; 3320 3304 wp_set_current_user( self::$user ); 3321 3305
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)