Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (22 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/core/nav/bpCoreNewSubnavItem.php

    r13507 r13980  
    5050    public function test_site_admin_only() {
    5151        $old_current_user = get_current_user_id();
    52         $this->set_current_user( 0 );
     52        self::set_current_user( 0 );
    5353
    5454        $this->assertFalse( bp_core_new_subnav_item( array(
     
    6161        ) ) );
    6262
    63         $this->set_current_user( $old_current_user );
     63        self::set_current_user( $old_current_user );
    6464    }
    6565
     
    110110        $u = self::factory()->user->create();
    111111        $old_current_user = get_current_user_id();
    112         $this->set_current_user( $u );
     112        self::set_current_user( $u );
    113113
    114114        $url = bp_members_get_user_url(
     
    128128        remove_action( 'bp_setup_nav', array( $this, 'new_nav_hook' ), 0 );
    129129
    130         $this->set_current_user( $old_current_user );
     130        self::set_current_user( $old_current_user );
    131131    }
    132132}
Note: See TracChangeset for help on using the changeset viewer.