Remove deprecated by-reference usage in testcase.php

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7493 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Define some constants conditionally in component loaders, to remove warnings when running unit tests.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7494 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove PHP notice from bp_stop_live_spammer() when running unit tests

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7495 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
In bp_is_current_component(), don't check is_page() if  is not populated.

Doing so causes warnings to be thrown when the function is called in certain instances
during automated testing.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7496 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fake some critical globals when running unit tests that touch wp_mail()

The wp_mail() function requires access to $_SERVER['SERVER_NAME'], which is
not available when running the unit tests. We follow the WordPress core test
suite, by faking this value during automated testing.

Note that the long-term solution to this issue should be to break notification
functionality out of the wrapper functions that are used to request friendship,
etc. The current fix is something of an ugly workaround, just to get the tests
running properly when using E_STRICT.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7497 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Avoid E_STRICT warning when running activity test

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7498 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix incorrect variable names in test_total_member_count_groups_leave_group()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7499 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix incorrect variable names again

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7500 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Use time() instead of gmktime() with no arguments

This is for E_STRICT compliance (since gmktime() with no argument uses time()
internally).

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7501 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix logic in BP_Groups_Group::get_by_letter() to avoid E_STRICT warnings

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7502 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Correct E_STRICT notices in BP_Groups_Group tests

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7503 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Declare test stub methods as static to avoid E_STRICT notices

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7504 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Declare missing $time variable throughout test cases

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7505 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Corrects some typos in BP_Activity_Activity unit tests

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7506 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Cast some variables in BP_Friends_Friend

Avoid E_STRICT warnings

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7507 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Bail out of loading buddypress-functions.php if $wp_query is not set

When $wp_query is not set, it means either that the main query has not run,
or that it has been somehow wiped out. Having an empty $wp_query global causes
problems in load_template() (used to load buddypress-functions.php()) because
of the way load_template() populates certain global variables from $wp_query.

An empty $wp_query global should not happen during normal page loads, but does
happen sometimes during unit testing, when globals are directly manipulated by
the bootstrap.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7508 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Make the initial value of default_visibility "public" in the BP_XProfile_Field class

This fixes a graphical bug where on the "Add Field" screen, none of the
"Default Visibilty" radio buttons were selected by default.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7509 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Friendlier, shorter visibility level labels for XProfile fields, to stay consistent with existing verbiage usages.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7510 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fetching XProfile field visibility levels should not be dependant on fetching field data.

Allow the fetching of only visibility levels without field data in `BP_XProfile_Group::get()` by moving the block outside of the `$fetch_field_data` check. Fixes #5222.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7511 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Mark `BP_XProfile_Field::admin_validate()` as a static method. Fixes debug notice when saving XProfile field settings in `wp-admin`. See #5108.

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