Wordpress/tests/phpunit/tests/user
Gary Pendergast 8e3b56fbe3 User Query: Cast $user_total as an int.
The `$user_total` member of `WP_User_Query`, and corresponding `get_total()` method, have always been documented as returning an `int`. `$user_total`, however, is populated by `$wpdb->get_var()`, which returns 
a string (containing an integer value). Casting the return value from `get_var()` as an `int` rectifies this discrepency.

Props runciters.
Fixes #39297.



git-svn-id: https://develop.svn.wordpress.org/trunk@39915 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 23:23:06 +00:00
..
author.php Build/Test Tools: Re-use a bunch of fixtures in test classes for user and XMLRPC tests. 2016-11-10 01:53:08 +00:00
capabilities.php Multisite: Handle capability check for removing oneself via map_meta_cap(). 2016-12-12 21:41:44 +00:00
countUserPosts.php Unit Tests: 2016-08-27 08:35:16 +00:00
countUsers.php Ensure the count for users with no role remains accurate when users with multiple roles are present. 2015-11-19 17:10:47 +00:00
dateQuery.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
getActiveBlogForUser.php Multisite: Introduce tests for get_active_blog_for_user(). 2016-10-25 18:02:08 +00:00
listAuthors.php Unit Tests: 2016-08-27 08:35:16 +00:00
mapMetaCap.php Build/Test Tools: Re-use a bunch of fixtures in test classes for user and XMLRPC tests. 2016-11-10 01:53:08 +00:00
multisite.php Roles/Capabilities: Add a new wp_roles_init filter. 2016-11-02 00:30:29 +00:00
query.php User Query: Cast $user_total as an int. 2017-01-16 23:23:06 +00:00
session.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
slashes.php Unit Tests: WP_UnitTest_Generator_Sequence needs a static incrementer - otherwise, it assumes every test class is a reset, which it no longer is (it is now static). 2015-10-17 19:24:20 +00:00
updateUserCaches.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
wpAuthenticateSpamCheck.php Users: Provide a full user object when checking for a spammy multisite user 2016-04-27 05:35:37 +00:00
wpDeleteUser.php Build/Test Tools: Continue eliminating randomness in tests. 2016-10-26 01:23:24 +00:00
wpDropdownUsers.php Allow 'role' parameters to be passed to wp_dropdown_users(). 2016-09-25 17:44:24 +00:00
wpGetUsersWithNoRole.php Users: Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name. 2016-10-14 12:04:50 +00:00
wpSetCurrentUser.php Unit Tests: 2016-08-27 08:35:16 +00:00