Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (2 years 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/routing/activity.php

    r13433 r13980  
    1313                $this->old_current_user = get_current_user_id();
    1414                $this->permalink_structure = get_option( 'permalink_structure', '' );
    15                 $this->set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
     15                self::set_current_user( self::factory()->user->create( array( 'role' => 'subscriber' ) ) );
    1616        }
    1717
    1818        public function tear_down() {
     19                self::set_current_user( $this->old_current_user );
     20                $this->set_permalink_structure( $this->permalink_structure );
     21
    1922                parent::tear_down();
    20                 $this->set_current_user( $this->old_current_user );
    21                 $this->set_permalink_structure( $this->permalink_structure );
    2223        }
    2324
Note: See TracChangeset for help on using the changeset viewer.