Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (14 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/suggestions.php

    r13314 r13980  
    112112    public function set_up() {
    113113        parent::set_up();
    114         $this->set_current_user( self::$current_user );
     114        self::set_current_user( self::$current_user );
    115115    }
    116116
    117117    public function tear_down() {
     118        self::set_current_user( self::$old_user_id );
    118119        parent::tear_down();
    119         $this->set_current_user( self::$old_user_id );
    120120    }
    121121
     
    269269
    270270        // "alpaca red" is in the hidden group
    271         $this->set_current_user( self::$user_ids['alpaca red'] );
     271        self::set_current_user( self::$user_ids['alpaca red'] );
    272272        $suggestions = bp_core_get_suggestions( array(
    273273            'group_id' => self::$group_ids['hidden'],
     
    289289
    290290        // "caterpillar" is in the private group
    291         $this->set_current_user( self::$user_ids['caterpillar'] );
     291        self::set_current_user( self::$user_ids['caterpillar'] );
    292292        $suggestions = bp_core_get_suggestions( array(
    293293            'group_id' => self::$group_ids['private'],
     
    328328
    329329
    330         $this->set_current_user( self::$user_ids['caterpillar'] );
     330        self::set_current_user( self::$user_ids['caterpillar'] );
    331331
    332332        // "cat" is in the private group, so won't show up here.
     
    359359
    360360
    361         $this->set_current_user( self::$user_ids['alpaca red'] );
     361        self::set_current_user( self::$user_ids['alpaca red'] );
    362362
    363363        // "alpaca red" is in the hidden group, so won't show up here.
Note: See TracChangeset for help on using the changeset viewer.