Problem/Motivation
The test class in core\modules\user\tests\src\Kernel\UserInstallTest.php uses a regular database query instead of using an entity query.
Proposed resolution
Replace the regular database query with an entity query and then use user storage to load the user entities. Use the loaded user entities in the assertions.
Info for novices:
The entity query for loading the user ids: $user_ids = \Drupal::entityQuery('user')->sort('uid')->execute();
The user entities are loaded with: $users = \Drupal::entityTypeManager()->getStorage('user')->loadMultiple($user_ids);
Remaining tasks
TBD
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
TBD