Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/09/2013 01:19:50 PM (9 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/activity/class.BP_Activity_Activity.php

    r6948 r7039  
    1010
    1111        $this->old_current_user = get_current_user_id();
    12         wp_set_current_user( $this->factory->user->create( array( 'role' => 'subscriber' ) ) );
     12        $this->set_current_user( $this->factory->user->create( array( 'role' => 'subscriber' ) ) );
    1313    }
    1414
    1515    public function tearDown() {
    1616        parent::tearDown();
    17         wp_set_current_user( $this->old_current_user );
     17        $this->set_current_user( $this->old_current_user );
    1818    }
    1919
Note: See TracChangeset for help on using the changeset viewer.