Changeset 54544 for branches/6.0/tests/phpunit/tests/pluggable.php
- Timestamp:
- 10/17/2022 04:53:54 PM (2 years ago)
- Location:
- branches/6.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0
-
branches/6.0/tests/phpunit/tests/pluggable.php
r53231 r54544 340 340 } 341 341 342 /**343 * @ticket 28020344 */345 public function test_get_user_by_should_return_same_instance_as_wp_get_current_user() {346 // Create a test user.347 $new_user = self::factory()->user->create( array( 'role' => 'subscriber' ) );348 349 // Set the test user as the current user.350 $current_user = wp_set_current_user( $new_user );351 352 // Get the test user using get_user_by().353 $from_get_user_by = get_user_by( 'id', $new_user );354 355 $this->assertSame( $current_user, $from_get_user_by );356 }357 342 }
Note: See TracChangeset
for help on using the changeset viewer.