More int-casting in test results

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7035 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't create a new user at the beginning of the BP_Core_User tests

This can cause problems later in the class with duplicate usernames

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7036 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In anonymous routing tests, ensure that user is logged out

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7037 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In test_filter_user_groups_normal_search(), declare a user_id to filter by

Recent changes in the test suite have ensured that the user is not necessarily
logged in at this point, so we can't rely on the current user fallback.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7038 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use $this->set_current_user() instead of wp_set_current_user() throughout tests

Our custom method includes additional logic for busting BP-specific global data
that must be run in order for certain tests to pass reliably.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7039 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In testcase set_current_user(), reset all $bp->loggedin_user data

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7040 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Put grant_super_admin() and restore_super_admins() methods in testcase

These are useful wrapper functions for setting/unsetting super admins multiple
times during tests

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7041 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improved sanitization in Blogs component database methods

- All integer array params are sanitized with wp_parse_id_list()
- Standardized treatment for LIKE clauses

Fixes #4994

Props DJPaul, johnjamesjacoby

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7042 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove all users at the beginning of each testcase round

There's an oddity when running the test suite on multisite that causes user
1 not to be rolled back properly between tests. This messes up the unit test
sequence generator for usernames, because attempts to create new users through
the factory use duplicate user_login values. By wiping the users table at the
beginning of each test set, we ensure we're starting with a clean slate.

This is not an ideal solution - it may be a bug in the WP test suite - but it's
a harmless enough hack to get our own tests working properly for now.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7043 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
When redirecting in the friendship requests tests, using trailingslashed URL

We don't want to trigger additional redirects

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7044 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In test_bp_has_members_friendship_requests(), make current user super admin before redirecting

This test involves rerouting to a user's friendship request page, which is only
visible to that user and to bp_moderate users. This set of tests is run as an
'administrator' user, which does not have the bp_moderate cap on multisite
installations, so we need to grant super admin priviliges to avoid failures
when attempting to load the user's requests page.

In theory, we should be able to set the current user to the owner of the
requests page. I ran into problems doing this, which appear to be related to
the way that our test suite's go_to() method tears down and sets up current
user data. This should be fixed for real in the future. This changeset is a
workaround until then.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7045 cdf35c40-ae34-48e0-9cc9-0c9da1808c22