Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (13 months ago)
Author:
espellcaste
Message:

Unit Tests: Conducted a thorough review of existing unit tests files and improved them to ensure robustness.

Props imath.

Closes https://github.com/buddypress/buddypress/pull/295
Fixes #9081

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/admin/functions.php

    r13777 r13980  
    99        parent::set_up();
    1010        $this->old_current_user = get_current_user_id();
    11         $this->set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) );
     11        self::set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) );
    1212
    1313        if ( ! function_exists( 'bp_admin' ) ) {
     
    2121
    2222    public function tear_down() {
     23        self::set_current_user( $this->old_current_user );
    2324        parent::tear_down();
    24         $this->set_current_user( $this->old_current_user );
    2525    }
    2626
Note: See TracChangeset for help on using the changeset viewer.