Skip to:
Content

BuddyPress.org

Changeset 7188


Ignore:
Timestamp:
06/07/2013 11:16:17 AM (12 years ago)
Author:
boonebgorges
Message:

In BP_UnitTestCase::create_user(), default to last_activity one year ago

Setting the default last_activity in the past ensures that queries related to
most recently active/online users will not be disrupted by the accidental
creation of new users.

Location:
trunk/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/includes/testcase.php

    r7141 r7188  
    206206        $r = wp_parse_args( $args, array(
    207207            'role' => 'subscriber',
    208             'last_activity' => bp_core_current_time(),
     208            'last_activity' => bp_core_current_time() - 60*60*24*365,
    209209        ) );
    210210
  • trunk/tests/testcases/admin/functions.php

    r7039 r7188  
    88    public function setUp() {
    99        parent::setUp();
    10 
    1110        $this->old_current_user = get_current_user_id();
    12         $this->set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
     11        $this->set_current_user( $this->create_user( array( 'role' => 'administrator' ) ) );
    1312
    1413        if ( ! function_exists( 'bp_admin' ) ) {
Note: See TracChangeset for help on using the changeset viewer.